Skip to content

Address ubuntu-26.04-related CI failures - #4267

Open
mbg wants to merge 9 commits into
mainfrom
mbg/deps/setup-kotlin
Open

mbg wants to merge 9 commits into
mainfrom
mbg/deps/setup-kotlin

Conversation

@mbg

@mbg mbg commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

ubuntu-latest is transitioning to ubuntu-26.04, which is causing a number of our CI checks to fail. This PR addresses the immediate failures to unblock other PRs:

  • The version of Kotlin installed by setup-kotlin uses Java functionality that is hard-deprecated. Kotlin is installed on the runners by default, but the version that is pre-installed is too new to be supported by CodeQL. This PR bumps the Kotlin version to a newer version that is compatible, and also updates the verion of setup-kotlin itself in our prepare-test action to the latest version (v2.1).
  • The setup-kotlin action hasn't been getting updates from Dependabot and I suspect the reason is that the Dependabot config is pointed at .github/actions while it expects to be pointed at the individual directories for re-usable actions. The directories key supports glob patterns, so I have updated this to a suitable one.
  • Some older versions of CodeQL aren't compatible with the Java version on ubuntu-26.04. I updated sync.ts to run them on the 24.04 images, but alternatively could have kept them on the newer ones with an explicit setup-java step to downgrade Java (although I didn't test whether that works or not).
  • We need to install a newer version of Ruby on ubuntu-26.04. The one we installed previously is not supported there.
  • code-scanning-rubocop hasn't had any updates in 2 years and even the latest version of it doesn't work with the version of Ruby we now need to install.
  • Therefore, I have removed the workflow that tests code-scanning-rubocop.

@mbg
mbg requested a review from a team as a code owner October 26, 2026 12:56
Copilot AI max review requested due to automatic review settings October 26, 2026 12:56
@github-actions github-actions Bot added the size/XS Should be very easy to review label Oct 26, 2026

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.

🟢 Approval recommended

The pinned version preserves the existing input contract, and no blocking issues were identified.

No open issues 🎉

What changed in this PR

Updates Kotlin setup for CI tests and adjusts Dependabot discovery to cover individual local action directories.

Changes:

  • Pins fwilhe2/setup-kotlin to the commit for v2.1.
  • Uses a directory glob for Dependabot updates to local actions.
File Description
.github/​dependabot.yml Targets individual local action directories with a glob.
.github/​actions/​prepare-test/​action.yml Updates the Kotlin setup pin to v2.1 and normalizes input quoting.

Review effort: Max

@mbg
mbg force-pushed the mbg/deps/setup-kotlin branch from 0d10f7b to eac0005 Compare October 26, 2026 13:23
@github-actions github-actions Bot added size/S Should be easy to review and removed size/XS Should be very easy to review labels Oct 26, 2026
@github-actions github-actions Bot added size/M Should be of average difficulty to review and removed size/S Should be easy to review labels Oct 26, 2026
@mbg mbg changed the title Update setup-kotlin action to the latest version Address ubuntu-26.04-related CI failures Oct 26, 2026
@mbg
mbg requested review from henrymercer and a max review from Copilot October 26, 2026 13:51

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

Runner and compiler compatibility across the affected CodeQL matrix still needs confirmation from successful CI runs.

1 open issue
6 files not reviewed

Review effort: Max

Comment thread pr-checks/sync.ts Outdated
os: runnerImage,
version,
});
if (runnerImage === "ubuntu-latest" && version === "stable-v2.20.7") {

@henrymercer henrymercer 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.

Thanks for doing this, I have a few suggestions, but none of them are blocking.

Comment thread pr-checks/sync.ts
Comment on lines +456 to +467
// stable-v2.20.7 requires an older version of Java than the default on `ubuntu-latest`.
// We could install that older version on the newer runners, or use the older runner.
// We do the latter here. This can be removed once we stop supporting `v2.20.7`.
// Since this is typed as `DefaultTestVersion`, it will become an error once `stable-v2.20.7`
// is removed from `defaultTestVersions`.
const requiresOlderRunnerImage: DefaultTestVersion = "stable-v2.20.7";
if (
runnerImage === "ubuntu-latest" &&
version === requiresOlderRunnerImage
) {
matrix.push({ os: "ubuntu-24.04", version });
} else {

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.

Another valid approach here would be overriding the runner image for (I think just) the multi-language check, since I believe this issue only affects checks that analyze Java.

Comment thread pr-checks/sync.ts
Comment on lines +459 to +460
// Since this is typed as `DefaultTestVersion`, it will become an error once `stable-v2.20.7`
// is removed from `defaultTestVersions`.

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.

(Though I believe we don't build the PR checks project as part of CI, so we'd only see this locally)

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.

Nit: we should remove this from the deflake workflow, since the list of deflaked workflows isn't autogenerated.

security-events: read
timeout-minutes: 45
runs-on: ubuntu-latest
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-latest') }}

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.

You already added one in sync.ts, but I think this deserves a comment too explaining why we're using ubuntu-24.04 with older CLIs.

# We currently need `security-events: read` to access feature flags.
security-events: read
runs-on: ubuntu-latest
runs-on: ${{ case(matrix.version == 'stable-v2.20.7', 'ubuntu-24.04', 'ubuntu-latest') }}

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.

Ditto

if: ${{ inputs.setup-kotlin == 'true' }}
with:
version: 1.8.21
version: 2.1.20

@henrymercer henrymercer Oct 26, 2026 •

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.

As mentioned in the PR description, this isn't the latest version of Kotlin. Consider adding a comment here explaining why we chose this version.

use-all-platform-bundle:
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
default: 'false'
default: "false"

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.

I presume this probably happened automatically, but we should consider adding a YAML formatter to CI to avoid this sort of noise.

Comment thread pr-checks/sync.ts
Comment on lines +140 to +141
// A type representing version identifiers.
type Version =

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.

This probably ought to be JSDoc (I see that this is an existing issue, but let's at least fix the new code)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants