Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45756 +/- ##
==========================================
- Coverage 85.24% 82.76% -2.49%
==========================================
Files 3086 3086
Lines 211717 211769 +52
Branches 49920 49934 +14
==========================================
- Hits 180475 175263 -5212
- Misses 27834 32905 +5071
- Partials 3408 3601 +193
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The integration suite runs serially in scripts/python_tests.sh, 20 to 28 minutes per database leg on a 4-vCPU runner that is mostly idle. With PYTEST_WORKERS > 1 (the three database jobs set 4) the script runs pytest -n with --dist loadfile. Every xdist worker gets its own metadata database, examples database and Redis database range, derived in the test config from PYTEST_XDIST_WORKER; the script migrates and seeds one database per worker before pytest starts, bashlib's setup-postgres/setup-mysql create the per-worker databases, and celery-worker starts one Celery worker per xdist worker on that worker's broker. A plain pytest run or PYTEST_WORKERS=1 keeps today's behaviour. Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…names table) Two leftovers of the serial run that pytest-xdist workers do not inherit: - PUBLIC_ROLE_LIKE: `superset init` gave Public the Gamma permissions, but the first public_role_like_* fixture teardown cleared them and most of the suite asserts anonymous requests are rejected on that cleared role. The test config now starts from a cleared Public role; tests that need Gamma use the public_role_like_gamma fixtures. - Table id 1: the first load_birth_names_dashboard_with_slices use created the birth_names SqlaTable and left the row behind, which the many insert_chart(..., 1) callers and the "[examples].[birth_names](id:1)" assertions rely on. An autouse session fixture now does that once up front. test_get_catalog_names tolerates the per-worker superset_gw<N> databases. Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… alone Under pytest-xdist each worker runs only part of the suite, so state that one file used to leave behind for a later one is no longer guaranteed to be there. Fix the tests that depended on it: - sql_lab/test_execute_sql_statements: superset.sql_lab.results_backend is a werkzeug LocalProxy, which defines __await__, so patch() built an AsyncMock whose set() returned a truthy coroutine. In a serial run sql_lab/api_tests.py had already swapped the proxy for a plain Mock, which hid this. Pin new_callable=MagicMock. - core_tests permalink tests: the anonymous-access assertions need the Public role to reach the view, which the serial run got from the first public_role fixture leaking Gamma permissions. Use public_role_like_gamma_scoped explicitly. - fixtures/users.create_role_with_permissions: add_role() returns an existing role untouched and the fixtures never delete their roles, so the "dar" role created by databases/api_tests.py with only all_database_access shadowed the datasource_access one security_tests expected. Make the role carry the requested permissions. - reports/api_tests native-filter tests: they query the first Dashboard without creating one; load the birth_names dashboard. - saved_queries related-databases test: compare by database id instead of relying on physical row order, which PostgreSQL does not preserve across updates. Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…migrated The semantic-cache coordination job runs integration tests against a bare SQLite file, so the session autouse fixture failed at setup with 'no such table: dbs'. Co-Authored-By: Evan Rusackas <evan@preset.io> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rusackas
force-pushed
the
ci/integration-tests-xdist
branch
from
November 13, 2026 07:09
e7b3433 to
3e228a4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
The Python integration suite runs serially:
scripts/python_tests.shcalls plainpytest, which takes 20 to 28 minutes per database leg (MySQL is the slowest) on a 4 vCPU runner that is mostly idle. Unlike sharding across more runners, which only moves the same CPU work around and adds a setup cost per shard, running the suite on pytest-xdist workers inside the one job should cut the runner minutes themselves, not just the wall clock.This is a draft spike to find out what the suite needs to run in parallel:
PYTEST_WORKERS(the three database jobs set it to 4) makesscripts/python_tests.shrunpytest -n <N> --dist loadfile, so each test file stays on one worker and module-scoped fixtures keep working.PYTEST_XDIST_WORKER(supersetbecomessuperset_gw0,superset.dbbecomessuperset-gw0.db, Redis dbs 2/3/4 shift by three per worker), so nothing in the test code changes.setup-postgresandsetup-mysqlinbashlib.shcreate the per-worker databases, andcelery-workerstarts one Celery worker per xdist worker on that worker's broker database.pytestrun, orPYTEST_WORKERS=1, keeps today's behaviour exactly.What I expect this run to surface: tests that depend on state another test file left behind, and MySQL tests that touch the shared
sqllab_test_dbandadmin_databasedatabases (on Postgres those are schemas inside each per-worker database, on MySQL they are still shared). I'll fix or isolate whatever shows up and post the runner-minute numbers against the serial runs before taking this out of draft.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
CI: the three database legs of the
Python-Integrationworkflow run with four workers. Compare their job durations with the serial runs onmaster.ADDITIONAL INFORMATION
🤖 Generated with Claude Code