You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2026/09/15 20:13:54 UTC
(superset) branch ci-fix-migration-conflict-detection created (now a8fde48da25)
This is an automated email from the ASF dual-hosted git repository.
aminghadersohi pushed a change to branch ci-fix-migration-conflict-detection
in repository https://gitbox.apache.org/repos/asf/superset.git
at a8fde48da25 fix(ci): match migration conflicts on filename, not contents_url
This branch includes the following new commits:
new a8fde48da25 fix(ci): match migration conflicts on filename, not contents_url
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(ci): match migration conflicts on filename, not contents_url
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aminghadersohi pushed a commit to branch ci-fix-migration-conflict-detection
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a8fde48da25a1e900cf9300c7ac90272b8c6029f
Author: Amin Ghadersohi <am...@gmail.com>
AuthorDate: Tue Sep 15 20:13:42 2026 +0000
fix(ci): match migration conflicts on filename, not contents_url
The "Check DB migration conflict" workflow tests each changed file with
`contents_url.includes('/contents/superset/migrations')`. The REST API
percent-encodes path separators in `contents_url`, so the value is
`/contents/superset%2Fmigrations%2Fversions%2F...` and that substring test
can never be true. The workflow has therefore never posted its comment.
Match on `filename` instead, the same field and prefix test the
enforce-single-migration-head workflow already uses. Also drop the
duplicate `issue_number` key from the `createComment` call, which was
shadowed by the later one and never exercised.
---
.github/workflows/check-db-migration-confict.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/check-db-migration-confict.yml b/.github/workflows/check-db-migration-confict.yml
index 007f88fefc9..a31436f5b52 100644
--- a/.github/workflows/check-db-migration-confict.yml
+++ b/.github/workflows/check-db-migration-confict.yml
@@ -60,12 +60,14 @@ jobs:
pull_number: pull.number,
});
const files = await github.paginate(listFilesOpts);
+ // Match on `filename`, not `contents_url`: the API percent-encodes
+ // path separators in `contents_url` (`/contents/superset%2Fmigrations%2F...`),
+ // so a substring test for `/contents/superset/migrations` never matches.
if (
- files.some(x => x.contents_url.includes('/contents/superset/migrations'))
+ files.some(x => x.filename.startsWith('superset/migrations/'))
) {
console.log(`PR #${pull.number} "${pull.title}" also added db migration`)
await github.rest.issues.createComment({
- issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pull.number,