Repository navigation
Maintain action versions by workflow in sync-back.ts - #4292
Merged
Merged
Conversation
This avoids failures on PRs where `sync-back.ts` is run as part of the "Rebuild" job if there are already version inconsistencies on the base branch.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Regression coverage is missing for scanning two workflows with different versions of the same action and passing the resulting map to updateTemplateFiles to verify that each template retains its own version.
1 open issue
1 file not reviewed
.github/workflows/__unsupported-macos.yml: Excluded by your content exclusion settings
What changed in this PR
This PR updates the workflow maintenance tooling to preserve action versions per workflow, preventing unrelated Dependabot updates from propagating inconsistent versions across templates.
Changes:
- Tracks action versions by workflow when updating templates.
- Selects one version for
sync.tsand warns when multiple versions are found. - Adapts existing tests and updates the unsupported-macOS template’s download-artifact pin.
| File | Description |
|---|---|
pr-checks/sync-back.ts |
Adds per-workflow version tracking and inconsistency warnings. |
pr-checks/sync-back.test.ts |
Adapts existing tests to the new version-map structures. |
pr-checks/checks/unsupported-macos.yml |
Updates actions/download-artifact from v8.0.1 to v8.0.2. |
Review effort: Balanced (auto)
henrymercer
reviewed
Nov 3, 2026
henrymercer
left a comment
Contributor
There was a problem hiding this comment.
Looks good, consider adding a regression test too, but happy to merge with just the JSDoc update.
mbg
enabled auto-merge
November 3, 2026 13:48
henrymercer
approved these changes
Nov 3, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 3, 2026
Contributor
|
@mbg The pull request was removed from the merge queue ( |
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.

On
main, we currently have a workflow generated frompr-checks/checksthat uses an older version ofactions/download-artifactthan other workflows in the repo. This likely happened because the PR which introduced the relevant workflow (unsupported-macos.yml) was worked on while a Dependabot PR which updatedactions/download-artifactwas merged. Consequently, the version ofactions/download-artifactused on the PR branch fell behind. When this was subsequently merged, the versions ofactions/download-artifactonmainbecome inconsistent.This is generally not a problem and will be rectified by Dependabot next time it runs, with the exception of the
sync-back.tsscript that's run as part of the "Rebuild" workflow. It incorrectly assumes that all versions of actions in the repo are always consistent because it only expects to run on Dependabot PRs where all versions of a given action have been aligned. This is not the case if the inconsistency exists onmainand Dependabot is not updating the relevant action. See e.g. #4289 which bumps a JS dependency, but ends up with workflow changes because of the inconsistency onmainand the broken assumption insync-back.ts.This PR modifies
sync-back.tsso that versions are tracked by workflow and only the versions found for a given generated workflow file are written to the corresponding specification. For the version written tosync.ts, we arbitrarily pick one if there are multiple (similar to the previous behaviour, although it may not be the same arbitrary one) and emit a warning.Alternatives considered
Ideally, we'd not end up with inconsistencies on
mainin the first place, but that would require us to validate that all used actions have the same version in e.g. a merge commit formainbefore actually merging it or otherwise compare the versions to those onmainin the merge queue. Since it's not fundamentally a problem, rarely happens, and will automatically be resolved by Dependabot after a week or so, I think the solution implemented here is acceptable however.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
.test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist