GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Maintain action versions by workflow in `sync-back.ts` by mbg · Pull Request #4292 · github/codeql-action

Conversation

@mbg

@mbg mbg commented Nov 3, 2026

Copy link
Copy Markdown
Member

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:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • Other - Please provide details. Tested locally.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mbg added 2 commits November 3, 2026 12:34
@mbg
Maintain action versions by workflow in sync-back.ts
7b8e4ce
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.
@mbg
Update version of actions/download-artifact in unsupported-macos …
cc88e02
…for consistency
Copilot AI auto review requested due to automatic review settings November 3, 2026 12:34
@mbg
mbg requested a review from a team as a code owner November 3, 2026 12:34
@github-actions github-actions Bot added the size/M Should be of average difficulty to review label Nov 3, 2026
Copilot started reviewing on behalf of mbg November 3, 2026 12:34
View session
Copilot AI reviewed Nov 3, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
  • Low severity Add regression test for per-workflow action versions · New
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.ts and 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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/sync-back.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mbg
Merge branch 'main' into mbg/ci/fix-sync-back
de3ece6
henrymercer
henrymercer reviewed Nov 3, 2026
View reviewed changes

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, consider adding a regression test too, but happy to merge with just the JSDoc update.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/sync-back.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mbg
Update JSDoc for scanGeneratedWorkflows
8a05ce6
@mbg
mbg requested a review from henrymercer November 3, 2026 13:41
@mbg
mbg enabled auto-merge November 3, 2026 13:48
henrymercer
henrymercer approved these changes Nov 3, 2026
View reviewed changes
@mbg
mbg added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@mbg The pull request was removed from the merge queue (CI_FAILURE). Please resolve any issues if required and enqueue the PR again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 1f8cacc Nov 3, 2026
231 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg deleted the mbg/ci/fix-sync-back branch November 3, 2026 14:41
This was referenced Nov 4, 2026
Merge main into releases/v4 #4299
Merged
Merge releases/v4 into releases/v3 #4304
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@henrymercer henrymercer henrymercer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/M Should be of average difficulty to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mbg @henrymercer
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.