aminghadersohi opened a new pull request, #44288: URL: https://github.com/apache/superset/pull/44288
### SUMMARY Restore a single Alembic head with one no-op merge revision. No existing migration, driver requirement, schema, or application data is changed by the new revision. Reproduced on exact master `ae240a8e6f0332acb709943d0884eae73927c9de`: both `ScriptDirectory.get_current_head()` and `flask_migrate.upgrade()` fail because the graph has two heads: - `c7f53d184ea2`: purge-audit pruning coordination, following `a6c21e5b4d93` (#43490). - `88a01c781622`: case-insensitive username index (#43939). Both paths descend from `7e2c9a4f1b83`. New revision `e2f3a1b9c640` joins them without rewriting ancestry that deployments may already have applied. This follows the documented `superset db merge` alternative and existing no-op merge migrations. This addresses the shared migration-startup blocker observed on #44285, #44286, and #44287, without changing those driver PRs. The general Python-Unit jobs on all three driver PRs passed; do not conflate it with the failing migration-dependent Presto/Hive, integration, and startup jobs. **Landing coordination:** #44283 already joins the same two parents inside a ClickHouse data migration. [Coordination requested](https://github.com/apache/superset/pull/44283#issuecomment-5675991165) to keep this baseline repair independent of that data rewrite. If this PR lands first, #44283 must rebase/reparent its migration onto `e2f3a1b9c640`; landing both unchanged would recreate two heads. If #44283 lands first, this PR must be reassessed/dropped. No agreement or maintainer approval is implied. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable. Before: two heads and ambiguous `upgrade head`. After: one head, `e2f3a1b9c640`. ### TESTING INSTRUCTIONS - Real Alembic graph: exact master has two heads; this change has only `e2f3a1b9c640`. - Real SQLite migrations: upgrades from each old head, both heads, common ancestor, and an empty DB passed. Merge-only downgrade preserved schema/data and restored both parent version rows; common-ancestor downgrade/re-upgrade also passed. - `pytest tests/unit_tests/migrations -q`: **147 passed before and after**. - Full `tests/common tests/unit_tests` baseline at exact master: **15,360 passed, 6 failed, 6 skipped, 2 xfailed**. Failures concern subject SQL quoting, theme commit count, MCP health infrastructure, missing optional profiler, and dashboard validation—not Alembic. The post-change full-suite comparison is running and will be reported separately; no claim of a clean local full suite. - Changed-file pre-commit and explicit staged mypy passed using the normal isolated hook environment. An initial run with test-only dependency overlays on `PYTHONPATH` caused unrelated mypy import errors; removing that overlay restored the standard hook environment. No hook or code exclusions changed. - Fresh independent review of exact commit `d6f00dcffec9beb74bc9480b40f38515c5527a5a`: no correctness findings; independently repeated real graph and SQLite transition validation. PostgreSQL/MySQL execution is left to CI/maintainer validation. Manual verification: 1. Run `superset db heads`: expect only `e2f3a1b9c640`. 2. Run `superset db upgrade` from either old head, both old heads, their common ancestor, or an empty metadata database. 3. From the new merge head, run `superset db downgrade c7f53d184ea2`: Alembic removes only the merge revision and restores **both** parent version rows, preserving schema/data. Use the explicit revision, not ambiguous relative `-1`. 4. Run `superset db upgrade` again. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [x] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [x] Migration is atomic, supports rollback & is backwards-compatible - [x] Confirm DB migration upgrade and downgrade tested - [x] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API The merge itself only updates Alembic version bookkeeping: negligible runtime, no application table changes or additional downtime. Previously unapplied parent migrations retain their own runtime/locking characteristics. SIP-59 maintainer approvals and review period still apply; independent automated review is not a substitute. -- 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]
