Skip to content

Commit 98efcc9

Browse files
trevorgowingclaude
andcommitted
Refactor sync branch naming and publish version resolution to support ordered PR merges
Several upstream releases had accumulated as pending sync PRs that could not be merged in order: the publish workflow resolved the build version by fetching the current latest upstream tag, so merging an older PR would build the wrong version against mismatched code, causing bin/build.sh to exit with code 255. Branch names also used the date rather than the release tag, so the duplicate-PR guard fired per day instead of per version, producing multiple open PRs for the same release. Renames sync branches from sync/upstream-<date> to sync/upstream-<tag> so the already-open check correctly deduplicates across days, and changes the publish workflow to extract VERSION from the branch name instead of fetching the latest upstream tag, so each PR merge builds the version it actually contains and older PRs can be merged in sequence. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b2cd13a commit 98efcc9

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/teal-docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
BRANCH="${{ github.event.pull_request.head.ref }}"
5858
5959
if [[ "$MERGED" == "true" ]] && [[ "$BRANCH" =~ ^sync/upstream- ]]; then
60-
VERSION=$(gh api repos/metabase/metabase/releases/latest --jq '.tag_name')
60+
VERSION="${BRANCH#sync/upstream-}"
6161
echo "should_build=true" >> "$GITHUB_OUTPUT"
6262
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
6363
echo "Upstream-sync PR merged — building $VERSION"

.github/workflows/teal-sync-upstream-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
id: status
5757
run: |
5858
TAG="${{ steps.upstream.outputs.release_tag }}"
59-
DATE=$(date +%Y-%m-%d)
60-
BRANCH="sync/upstream-$DATE"
59+
BRANCH="sync/upstream-$TAG"
6160
6261
if git merge-base --is-ancestor "$TAG" HEAD; then
6362
echo "result=already-synced" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)