Skip to content

Conversation

@flyingsilverfin
Copy link
Member

  • 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
Copy link
Member Author

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
Copy link
Member Author

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)
Copy link
Member Author

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([
Copy link
Member Author

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

@flyingsilverfin flyingsilverfin merged commit 222cafc into master Oct 2, 2025
1 check passed
@flyingsilverfin flyingsilverfin deleted the fix-flakiness branch October 2, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants