Skip to content

CodeQL: move to action v4 before the deprecated v2 is retired - #1259

Merged
bert-e merged 2 commits into
development/1.0from
improvement/codeql-action-v3
Oct 19, 2026
Merged

bert-e merged 2 commits into
development/1.0from
improvement/codeql-action-v3

Conversation

@JeanMarcMilletScality

@JeanMarcMilletScality JeanMarcMilletScality commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR — The CodeQL workflow still pins the action major GitHub has deprecated; this moves it to v4 before v2 stops running.

Context / Why

Every CodeQL run in this repo logs an error annotation from GitHub:

##[error]CodeQL Action major versions v1 and v2 have been deprecated. Please update all
occurrences of the CodeQL Action in your workflow files to v3.

Nothing is red today — GitHub annotates but still runs v2, and the recent runs on development/1.0 are green. It turns into a hard failure when v2 is actually retired, and the fix is the same two lines either way.

The annotation asks for v3, but v3 is not where this should land: it is already announced for deprecation in December 2026, and GitHub now cuts both majors on the same day (v4.39.0 and v3.39.0 both went out on 15 October 2026). v4 is the current major and runs on node24, which the hosted ubuntu-latest runners provide.

🧩 Approach

       - name: Initialize CodeQL
-        uses: github/codeql-action/init@v2
+        uses: github/codeql-action/init@v4

       - name: Build and analyze
-        uses: github/codeql-action/analyze@v2
+        uses: github/codeql-action/analyze@v4

codeql.yaml is the only file in the repo pinning a CodeQL action; the other six workflows are already on current majors.

🧪 How to test

The workflow runs on this PR. Open the Static analysis with CodeQL check and confirm two things: the deprecation annotation is gone from Initialize CodeQL, and the analysis still completes and uploads its results, with the job's conclusion staying success.

@bert-e

bert-e commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@eve-scality

Copy link
Copy Markdown
Contributor

ℹ️ No review performed

No test review was performed: no code under test could be determined: the pull request changes no code and no tests.

@JeanMarcMilletScality
JeanMarcMilletScality marked this pull request as ready for review October 16, 2026 16:30
Comment thread .github/workflows/codeql.yaml Outdated

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3

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.

v3 is not the current major: GitHub shipped CodeQL Action v4 (Node 24) in October 2025 and has said v3 will be deprecated in December 2026, which is two months away. Go straight to v4 so this change doesn't have to be made again.

Suggested change
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4

Comment thread .github/workflows/codeql.yaml Outdated

- name: Build and analyze
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

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.

Same as init: pin analyze to v4 so both steps stay on the same major.

Suggested change
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4

v3 is not the landing place: it is already announced for deprecation in
December 2026, and GitHub has been cutting both majors on the same day
since v4 shipped. v4 runs on node24, which the hosted ubuntu runners
provide.
@bert-e

bert-e commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality JeanMarcMilletScality changed the title CodeQL: move to action v3 before the deprecated v2 is retired CodeQL: move to action v4 before the deprecated v2 is retired Oct 19, 2026
@JeanMarcMilletScality

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e
bert-e merged commit c0f83b3 into development/1.0 Oct 19, 2026
9 checks passed
@bert-e

bert-e commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.0

Please check the status of the associated issue None.

Goodbye jeanmarcmilletscality.

The following options are set: approve

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants