Skip to content
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

chore: Reenable SQLite tests which leverage foreign key constraints et al. #24605

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/superset-python-integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ jobs:
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
REDIS_PORT: 16379
SUPERSET__SQLALCHEMY_DATABASE_URI: |
sqlite:///${{ github.workspace }}/.temp/unittest.db
Copy link
Member Author

@john-bodley john-bodley Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird name for a database used for integration (as opposed to unit) tests. Calling this superset.db is inline with how the metadata database is named elsewhere—including in this workflow for MySQL and PostgreSQL.

sqlite:///${{ github.workspace }}/.temp/superset.db?check_same_thread=true
Copy link
Member Author

@john-bodley john-bodley Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This threw me for a curveball. I was able to successfully run the tests locally but they failed remotely with a somewhat cryptic error stating a reference table being specified in this fixture didn't exist.

I speculate that this is probably due to a multithreading or connection pooling issue when running via a GitHub workflow. Ensuring a single connection per thread seems to remedy the problem. 🤞

SUPERSET__SQLALCHEMY_EXAMPLES_URI: |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per here, if undefined the metadata and example databases are the same and given that SQLite doesn't support schemas. It seems prudent to split these into two after @dpgaspar's #25003 which isolated the examples database.

sqlite:///${{ github.workspace }}/.temp/examples.db?check_same_thread=true
services:
redis:
image: redis:7-alpine
Expand Down
Loading
Loading