Skip to content

Deprecate tools: latest and remove it in v5 - #4375

Open
henrymercer wants to merge 4 commits into
mainfrom
henrymercer/tools-latest-warning
Open

henrymercer wants to merge 4 commits into
mainfrom
henrymercer/tools-latest-warning

Conversation

@henrymercer

Copy link
Copy Markdown
Contributor

This PR deprecates tools: latest since its name is potentially misleading and has been replaced with linked. The name suggests that it tracks the newest CodeQL release, but it actually selects the version of CodeQL shipped with the release of the Action in use, so workflows that pin an older version of the Action get an older version of CodeQL.

The warning now recommends removing the tools input (or github-codeql-tools repository property) to use the recommended version of CodeQL, or replacing latest with linked to keep the current behaviour. The tools input can come from either, so the warning moves from getCodeQLSource to getToolsInput, where the source is known, and points to whichever one was set. Since it's now logged before setup, it's also logged when the ForceNightly feature flag replaces latest with a nightly, but this is a rare enough occurrence to be acceptable.

From CodeQL Action v5, tools: latest fails with a configuration error that gives the same advice.

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?

Workflow types:

  • Advanced setup - Impacts users who have custom CodeQL workflows.
  • Managed - Impacts users with dynamic workflows (Default Setup, Code Quality, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.
  • Code Quality - The changes impact analyses when analysis-kinds: code-quality.
  • Other first-party - The changes impact other first-party analyses.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.
  • GHES - Impacts CodeQL workflows on GitHub Enterprise Server.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

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

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.

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.
henrymercer and others added 3 commits December 3, 2026 16:38
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI adaptive review requested due to automatic review settings December 3, 2026 17:59
@github-actions github-actions Bot added the size/M Should be of average difficulty to review label Dec 3, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The v5 gate breaks the supported tools-input contract for init and setup-codeql, including repository-property overrides and managed workflows, exceeding the limited review scope.

No open issues 🎉

1 file not reviewed
What changed in this PR

Deprecates tools: latest in the CodeQL Action and rejects it starting in v5, guiding users toward the recommended CodeQL version or tools: linked.

Changes:

  • Moves validation to input resolution so messages identify the workflow input or repository property.
  • Adds deprecation and v5 rejection tests while retaining version-selection coverage.
  • Documents migration options in a release note.
File Description
unreleased-change-notes/​tools-latest-deprecation.md Documents deprecation and migration options.
src/​setup-codeql.ts Removes the old compatibility warning.
src/​setup-codeql.test.ts Retains version-selection coverage without the old warning assertion.
src/​config/​inputs.ts Adds source-aware warnings and v5 rejection.
src/​config/​inputs.test.ts Tests warnings, rejection, and continued linked support.

Review effort: Balanced (adaptive)

@henrymercer
henrymercer marked this pull request as ready for review December 3, 2026 18:04
@henrymercer
henrymercer requested a review from a team as a code owner December 3, 2026 18:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Should be of average difficulty to review

2 participants