Repository navigation
Conversation
… existing branch `Find the target release` treated an existing `upstream/ds-bot-<ref>` branch as "already done", so after `gh pr create` failed once (runs 45976212422 on 11-27 and 46128184106 on 11-28) every later run skipped sync, suite, smoke and the pull request step and reported success (run 46244596502 on 11-29) while main stayed pinned to v0.3.10 and no pull request was ever opened. - Done now means an open pull request for the head branch, not the branch existing; the skip message and the step summary name the pull request number. - A branch that exists without an open pull request is reused instead of skipped: a new `Check out the sync branch` step fetches and tracks it, `Sync` is gated on the branch being absent, and the suite, the smoke and the pull request step still run, so one failed `gh pr create` cannot stall the tracker. - A run that cannot open the pull request stays red and names the branch, the upstream ref and the tag main is pinned to. No change to the pin, to the vendored tree, or to any container file. Related #3448
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci: retry the upstream tracker pull request instead of skipping on an existing branch
Head
f37841fcf782541057cab7db11e2cdcf3b5949c4(treebc8963bc1ccffb7b58c2f163757868e44d0c3ab0,parent
2facf12ebf5a2151e17dcc497a5b3da5a674580f). The first push of this branch carried the sametree under a locally synthesized parent commit with no shared history, so the pull request was refused
("no history in common with main"); the commit was re-parented onto
2facf12ewith the tree,the message and the author unchanged. One file,
+43/−9:.github/workflows/ds-bot-upstream-track.yml(7c83447e→7686618b).Why
Find the target releasetreated an existingupstream/ds-bot-<ref>branch as "already done", andPush and open the pull requestran only when it was not. Whengh pr createfailed(run
45976212422on 11-27,46128184106on 11-28), the branch stayed behind and every later runtook the "branch already exists" path: sync, suite, smoke and the pull request step were all
skipped, and the run reported success (run
46244596502on 11-29). Main stayed pinned tov0.3.10and no pull request was ever opened fromupstream/ds-bot-v0.4.0(8eb905ad) orupstream/ds-bot-v0.4.2(c422d5be). Details and the run table are in #3448.What changed
gh pr list --head "$branch" --state open --limit 1 --json number --jq '.[].number'and onlysets
skip=truewhen that prints a number. The skip message and the step summary name thepull request; a skip for "already pinned" and a skip for "pull request already open" no longer
look the same.
Check out the sync branchstep fetchesrefs/heads/<branch>and doesgit switch -c <branch> --track origin/<branch>when the branch exists, otherwise creates it from main.Sync(sync,check,UPSTREAM.mdrewrite, commit) is now gated onbranch_exists == 'false'; the suite, the smokeand the pull request step still run, so one failed
gh pr createcan never stall the trackeragain.
the tag main is still pinned to, and both remedies (repository setting or
DS_BOT_TRACK_TOKEN).The next run then reuses the branch and retries this step instead of skipping.
Steps and conditions after the change:
skip == 'false'skip == 'false' && branch_exists == 'false'skip == 'false'skip == 'false'skip == 'false'always() && skip == 'false'No change to the pin, to
runtime/ds-bot-upstream, to any container file, or to job permissions(
contents: write,pull-requests: write;gh pr listneeds no permission this job lacks).Verification (local, not CI)
The workflow parses (PyYAML 6.0) and has 9 steps in the order above; job permissions and env are
unchanged.
Decision matrix, old script vs new, real
node, stubgh/git(only the network-boundlatestquery is stubbed):skip=trueskip=true, summarymain is already pinned to v0.3.10skip=falseskip=false,branch_exists=falseskip=true(the stall)skip=false,branch_exists=trueskip=trueskip=true,open_pr=3500skip=trueskip=true,open_pr=3499Check out the sync branchagainst a real bare remote: withbranch_exists=trueit lands onthe remote branch tip (
cff3434, the marker file committed on that branch present,@{u}=origin/upstream/ds-bot-v0.4.2), and the latergit push origin <branch>printsEverything up-to-date, exit 0. Withbranch_exists=falseit creates the branch from main(
bf8ee48, no marker file, no upstream), which is the stateSyncexpects.node scripts/ds-bot-upstream.mjs check→ok (Fei2411/DS-Bot@d104d9ca18d6, ds-bot 0.3.10, v0.3.10; 12 paths), exit 0.tests/ci_test_list.test.mjs(the suite that reads.github/workflows): 2/2 pass, exit 0.runtime/flybot-workspace-web:node --test --test-concurrency=2 test/*.test.js(node
v22.23.5) → 497 tests / 497 pass / 0 fail / 0 cancelled / 0 skipped, exit 0.Not verified here
workflow_dispatchrun: this branch has no push access from the authoring host, so theacceptance dispatch (
ref: v0.4.2) is the reviewer's step. Expected outcome on the currentrepository configuration (
default_workflow_permissions: read,can_approve_pull_request_reviews: false,DS_BOT_TRACK_TOKENunset): sync, suite, smoke run and the run ends red at the pullrequest step with the new message — that is the accepted alternative in Upstream tracker stalls silently once its sync branch exists without a pull request #3448, not a green run.
actionlintis not installed on the authoring host, so no lint pass beyond the YAML parse.dockeris unavailable locally, so the container smoke step was not exercised.jqis unavailable locally, so the--jq '.[].number'filter was not executed; it relies on thebase jq behaviour that
.[]over an empty array produces no output (an emptyopen_pr).Out of scope
Upgrading the pin to
v0.4.2(vendored upstream plus container, its own risk:T3 review), and therepository setting /
DS_BOT_TRACK_TOKENsecret, which are owner decisions recorded in #3448.Related #3448