-
Notifications
You must be signed in to change notification settings - Fork 0
Optimize lambda and upgrade typedb-driver #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
flyingsilverfin
commented
Oct 2, 2025
- use a TypeDB driver that fixes flakiness in tests - I think it stems from opening and closing the connection quickly, but not entirely sure. Seems stable now!
- optimize lambda to avoid opening and tearing down the TCP connection to the server over and over again by re-using the TypeDB Driver instance
- add logging to print out time taken for specific operations so we can try to work out why things are slow in the frontend randomly
| db_name = "test-db" | ||
| server_host = "typedb.localhost.localstack.cloud:4566" | ||
|
|
||
| # Global driver instance for reuse across Lambda invocations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big Perf optimization
| @@ -1 +1,2 @@ | |||
| typedb-driver | |||
| --index-url=https://repo.typedb.com/public/public-snapshot/python/simple/ | |||
| typedb-driver==0.0.0+bf3f4548451b471f9964c550dfcfe07723059482 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patched, unrelease typedb-driver
| format: ## Run ruff to format the whole codebase | ||
| $(VENV_RUN); python -m ruff format .; python -m ruff check --output-format=full --fix . | ||
|
|
||
| test: ## Run integration tests (requires LocalStack running with the Extension installed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed for symmetry with test-lambda
| console.log('🔄 Loading initial data concurrently...'); | ||
|
|
||
| // Load users and groups in parallel | ||
| const [usersData, groupsData] = await Promise.all([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load from the API concurrently