rusackas opened a new pull request, #45601:
URL: https://github.com/apache/superset/pull/45601

   ### SUMMARY
   The "Import test data" step is the single biggest cost in the E2E workflow: 
5 to 6 minutes of `superset load_examples` in each of the four Playwright 
matrix jobs, all loading identical data into their Postgres service. Over 20 
minutes of runner time per PR, before a single test runs.
   
   This keeps a `pg_dump` of the loaded database in the Actions cache (a new 
`playwright-testdata` entry in `caches.js`, same mechanism as the 
`instrumented-assets` cache). The key hashes everything that shapes the data: 
`superset/examples/**` (loaders and YAML configs), `superset/migrations/**`, 
the `load_examples` and `load_test_users` CLI modules, the CI test config, 
`bashlib.sh`, and the E2E workflow itself since it pins the Postgres image the 
dump has to match.
   
   On a hit, `playwright_testdata` restores the dump and still runs `superset 
db upgrade` and `superset init`, both no-ops on a dump built from the same 
migrations and views, as a safety net. On a miss it loads exactly as before and 
then saves the dump. `pg_dump`/`pg_restore` run inside the Postgres service 
container (`job.services.postgres.id`), so the client always matches the server 
version. The restore filters the `public` schema entry out of the archive's 
table of contents so it never conflicts with the fresh database, and the two 
empty schemas `setup-postgres` creates are excluded from the dump for the same 
reason. Caches built on `master` are readable by PR runs, so most PRs should 
hit.
   
   The first run on this PR is a miss and shows the dump/save overhead; I'll 
re-run it to measure the hit path and post both numbers here.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A
   
   ### TESTING INSTRUCTIONS
   Compare the "Import test data" step on the E2E jobs of this PR's re-run 
against a recent master run (about 5m30s). The Playwright suites themselves are 
the behavioural check that the restored data is complete.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to