Only run snapshot-bump workflow when .version changed#6724
Merged
Conversation
The `snapshot-bump` workflow used to run on every non-scheduled, non-`bump` commit on `main`. Combined with `create_next_snapshot_version`'s only de-duplication being "is the bump branch currently on the remote?", any commit that landed on `main` between a release and the merge of its follow-up bump PR could open a duplicate bump PR (e.g. #6720 was opened 20s after #6719 merged because `bump/<v>` had just been deleted). Compute `version_file_changed` in the dynamic-config setup job by diffing the triggering commit against its parent for `.version`, forward it via `continuation/continue`'s `parameters` arg, and add it as a `when` condition on the `snapshot-bump` workflow. Now the workflow only triggers on commits that actually modified `.version` — i.e. the release commit itself (where the lane runs the bump) and the bump merge commit (where the lane no-ops because `.version` is now a SNAPSHOT). Unrelated commits on `main` no longer race against an in-flight bump PR. Made-with: Cursor
Mirrors the existing `.circleci/generate-requested-jobs-config.js` pattern so future derived pipeline parameters can be added without growing the inline shell in `.circleci/config.yml`. Made-with: Cursor
The Node script's name and its own comments already convey what this step does. Made-with: Cursor
The parameter name is self-explanatory and the rationale already lives in the generate-continuation-parameters.js script and commit history. Made-with: Cursor
tonidero
approved these changes
May 4, 2026
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Interesting approach! I think this makes sense 👍
This was referenced May 6, 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.
Checklist
purchases-androidand hybridsMotivation
The
snapshot-bumpworkflow runs on every commit tomain, and the underlying lane only de-duplicates against the livebump/<version>branch — not against already-merged bump PRs. So a commit that lands onmainwhile a bump PR is in flight can race against the bump branch being deleted on merge and open a duplicate "prepare next version" PR (this is what produced #6720, 20s after #6719 merged).Description
snapshot-bumpworkflow to only run on commits that actually modify.version.mainno longer can.version_file_changedparameter from the triggering commit and forwards it to the workflow'swhencondition.Note
Low Risk
Low risk CI-only change that narrows when
snapshot-bumpruns; main risk is accidentally skipping the workflow if the git diff check fails in unusual pipeline contexts (e.g., shallow clones).Overview
Stops
snapshot-bumpfrom running on everymaincommit by adding a newversion_file_changedpipeline parameter and requiring it to betruein the workflow’swhenclause.The CircleCI setup job now generates and forwards continuation parameters via a new
.circleci/generate-continuation-parameters.jsscript, which detects whether the triggering commit modified.versionand writes the result to/tmp/continuation-parameters.jsonforcontinuation/continue.Reviewed by Cursor Bugbot for commit 83ff03e. Bugbot is set up for automated code reviews on this repo. Configure here.