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

   ### SUMMARY
   
   The "Check DB migration conflict" workflow posts a comment to any open PR 
whose base branch just picked up a competing DB migration. The comment itself 
was pretty rough: a row of 16 repeated folded-hands emoji plus a red 
exclamation mark, and its only guidance was a bare link to the contributing 
docs, with no explanation of what a "migration conflict" actually is or why it 
matters.
   
   This trims the emoji down to a single heading icon and adds the missing 
context inline: why the conflict happens (Alembic migrations are a single 
linear chain, so two migrations branching off the same parent revision create 
two heads instead of one), what it breaks (`superset db upgrade` fails with 
`Multiple head revisions are present`), and the concrete steps to check for and 
fix it (rebase, run `superset db heads`, update the losing migration's 
`down_revision`). The existing docs link stays, for a full worked example.
   
   **Before:**
   
   
![before](https://github.com/rusackas/superset/releases/download/pr-screenshots-2026-09-21/before-migration-conflict-comment.png)
   
   **After** (this is literally the new message text, rendered):
   
   ---
   
   ### ⚠️ Possible DB migration conflict
   
   @someuser the base branch `master` picked up a new database migration under 
`superset/migrations/` after this PR was opened, and this PR adds or modifies 
migration files too. Alembic migrations form a single linear chain, so if both 
branch off the same parent revision, merging this PR as-is could leave the 
migration history with two heads instead of one, which makes `superset db 
upgrade` fail with `Multiple head revisions are present`.
   
   To check and, if needed, fix this:
   
   1. Rebase this branch onto the latest `master`.
   2. Run `superset db heads`. If it lists more than one revision, you have a 
conflict.
   3. In your new migration's script, update `down_revision` (and the `Revises` 
comment) to point at the other head instead, so the chain has a single head 
again.
   
   See [Merging DB 
Migrations](https://superset.apache.org/docs/contributing/development#merging-db-migrations)
 in the contributing guide for a worked example.
   
   ---
   
   No behavior change: same trigger conditions, same PRs get commented on, just 
better wording. Verified the docs link still resolves (`curl` 200).
   
   ### TESTING INSTRUCTIONS
   
   - `zizmor .github/workflows/check-db-migration-confict.yml` — no findings.
   - Rendered the exact template-literal string with Node to confirm the 
markdown renders as intended (see "After" above, copied directly from that 
output).
   - No functional/logic changes to the trigger conditions or the PR-matching 
logic, only the comment body string.
   
   ### 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