| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
There was a problem hiding this comment.
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 reviewedThis PR updates the workflow maintenance tooling to preserve action versions per workflow, preventing unrelated Dependabot updates from propagating inconsistent versions across templates.
Changes:
| 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)
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, consider adding a regression test too, but happy to merge with just the JSDoc update.
Sorry, something went wrong.
|
@mbg The pull request was removed from the merge queue (CI_FAILURE). Please resolve any issues if required and enqueue the PR again. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
On main, we currently have a workflow generated from pr-checks/checks that uses an older version of actions/download-artifact than 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 updated actions/download-artifact was merged. Consequently, the version of actions/download-artifact used on the PR branch fell behind. When this was subsequently merged, the versions of actions/download-artifact on main become inconsistent.
This is generally not a problem and will be rectified by Dependabot next time it runs, with the exception of the sync-back.ts script 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 on main and 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 on main and the broken assumption in sync-back.ts.
This PR modifies sync-back.ts so 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 to sync.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 main in the first place, but that would require us to validate that all used actions have the same version in e.g. a merge commit for main before actually merging it or otherwise compare the versions to those on main in 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?
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