From 64e5c6243a4e038d230343674392b1e7166be75f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 16 Oct 2026 13:59:52 +0100 Subject: [PATCH 1/3] Prepare per-language bundle graduation checks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d9f196d4-6d15-44ca-bd01-cd022d57d2cc --- .../__export-file-baseline-information.yml | 7 +++- .../__per-language-bundle-validation.yml | 33 +++++++++++------- .../export-file-baseline-information.yml | 10 +++--- .../checks/per-language-bundle-validation.yml | 34 +++++++++++-------- 4 files changed, 52 insertions(+), 32 deletions(-) diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 597c7ce9b6..7badf827f1 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -91,6 +91,11 @@ jobs: with: languages: javascript tools: ${{ steps.prepare-test.outputs.tools-url }} + # To balance speed and coverage, analyze only JavaScript but use the combined bundle so + # baseline information is reported for every language in the multi-language repository. A + # no-op custom configuration selects that conservative path for custom configurations. + config: | + paths-ignore: [] - name: Build code run: ./build.sh - uses: ./../action/analyze @@ -124,5 +129,5 @@ jobs: env: CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS: false CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: false + CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__per-language-bundle-validation.yml b/.github/workflows/__per-language-bundle-validation.yml index ea900a9e09..07930b35ab 100644 --- a/.github/workflows/__per-language-bundle-validation.yml +++ b/.github/workflows/__per-language-bundle-validation.yml @@ -36,40 +36,40 @@ jobs: include: - language: actions os: ubuntu-latest - version: nightly-latest + version: linked expected-extractors: actions javascript - language: cpp os: ubuntu-latest - version: nightly-latest + version: linked build-mode: manual build-command: gcc -o main main.c - language: csharp os: ubuntu-latest - version: nightly-latest + version: linked build-mode: none - language: go os: ubuntu-latest - version: nightly-latest + version: linked build-mode: autobuild - language: java os: ubuntu-latest - version: nightly-latest + version: linked build-mode: none - language: javascript os: ubuntu-latest - version: nightly-latest + version: linked - language: python os: ubuntu-latest - version: nightly-latest + version: linked - language: ruby os: ubuntu-latest - version: nightly-latest + version: linked - language: rust os: ubuntu-latest - version: nightly-latest + version: linked - language: swift os: macos-latest-xlarge - version: nightly-latest + version: linked build-mode: autobuild name: Per-language bundles if: github.triggering_actor != 'dependabot[bot]' @@ -88,6 +88,14 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Remove CodeQL from toolcache + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + with: + script: | + const fs = require('fs'); + const path = require('path'); + const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); + fs.rmdirSync(codeqlPath, { recursive: true }); - uses: ./../action/init id: init with: @@ -128,9 +136,8 @@ jobs: CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} run: | # A bundle that is missing most of its extractors must never be left in the toolcache, - # where a later job analyzing a different language could pick it up. The runner image - # ships with its own CodeQL in the toolcache, so check where this bundle was extracted to - # rather than whether the toolcache contains CodeQL at all. + # where a later job analyzing a different language could pick it up. Per-language bundles + # must instead be extracted under the runner's temporary directory. echo "CodeQL is at $CODEQL_PATH" if [[ "$CODEQL_PATH" == "$RUNNER_TOOL_CACHE"/* ]]; then echo "::error::The per-language bundle was added to the toolcache at $CODEQL_PATH." diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index da32372383..87c4b7609b 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -11,16 +11,18 @@ installDotNet: true env: CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS: false CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true - # To balance speed and coverage, we analyze only a single language (JavaScript), but use the - # combined bundle so we can test that baseline information is reported for each language in the - # multi-language source directory. - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: false + CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true steps: - uses: ./../action/init id: init with: languages: javascript tools: ${{ steps.prepare-test.outputs.tools-url }} + # To balance speed and coverage, analyze only JavaScript but use the combined bundle so + # baseline information is reported for every language in the multi-language repository. A + # no-op custom configuration selects that conservative path for custom configurations. + config: | + paths-ignore: [] - name: Build code run: ./build.sh - uses: ./../action/analyze diff --git a/pr-checks/checks/per-language-bundle-validation.yml b/pr-checks/checks/per-language-bundle-validation.yml index 21fe33e757..ac22f67f50 100644 --- a/pr-checks/checks/per-language-bundle-validation.yml +++ b/pr-checks/checks/per-language-bundle-validation.yml @@ -1,49 +1,56 @@ name: Per-language bundles description: Validates extraction and analysis using each per-language CodeQL bundle. -# TODO: Use a released bundle once releases include per-language bundles. matrix: include: - language: actions os: ubuntu-latest - version: nightly-latest + version: linked # Actions also needs the JavaScript extractor. expected-extractors: actions javascript - language: cpp os: ubuntu-latest - version: nightly-latest + version: linked build-mode: manual build-command: gcc -o main main.c - language: csharp os: ubuntu-latest - version: nightly-latest + version: linked build-mode: none - language: go os: ubuntu-latest - version: nightly-latest + version: linked build-mode: autobuild - language: java os: ubuntu-latest - version: nightly-latest + version: linked build-mode: none - language: javascript os: ubuntu-latest - version: nightly-latest + version: linked - language: python os: ubuntu-latest - version: nightly-latest + version: linked - language: ruby os: ubuntu-latest - version: nightly-latest + version: linked - language: rust os: ubuntu-latest - version: nightly-latest + version: linked - language: swift os: macos-latest-xlarge - version: nightly-latest + version: linked build-mode: autobuild env: CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true steps: + - name: Remove CodeQL from toolcache + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + with: + script: | + const fs = require('fs'); + const path = require('path'); + const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); + fs.rmdirSync(codeqlPath, { recursive: true }); - uses: ./../action/init id: init with: @@ -84,9 +91,8 @@ steps: CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} run: | # A bundle that is missing most of its extractors must never be left in the toolcache, - # where a later job analyzing a different language could pick it up. The runner image - # ships with its own CodeQL in the toolcache, so check where this bundle was extracted to - # rather than whether the toolcache contains CodeQL at all. + # where a later job analyzing a different language could pick it up. Per-language bundles + # must instead be extracted under the runner's temporary directory. echo "CodeQL is at $CODEQL_PATH" if [[ "$CODEQL_PATH" == "$RUNNER_TOOL_CACHE"/* ]]; then echo "::error::The per-language bundle was added to the toolcache at $CODEQL_PATH." From 9bf78d13c9b17244340569e11ccfa22460cb1ca7 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 16 Oct 2026 14:00:12 +0100 Subject: [PATCH 2/3] Use per-language bundles by default Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d9f196d4-6d15-44ca-bd01-cd022d57d2cc --- lib/entry-points.js | 32 +++----- src/per-language-bundles.test.ts | 28 ------- src/per-language-bundles.ts | 15 +--- src/setup-codeql.test.ts | 129 ++++++++++++++----------------- src/setup-codeql.ts | 25 +++--- 5 files changed, 83 insertions(+), 146 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 1a99a44427..dfa3adefcb 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -175692,11 +175692,7 @@ function getOtherLanguagePacksReason(inputs) { function findNonBuiltInQuery(queries) { return queries?.find((query) => !defaultSuites.has(query.uses))?.uses; } -async function getPerLanguageBundleLanguage({ - env, - features, - logger: logger2 -}, options) { +function getPerLanguageBundleLanguage({ env, logger: logger2 }, options) { const { rawLanguages, otherLanguagePacksReason, @@ -175710,9 +175706,6 @@ async function getPerLanguageBundleLanguage({ logger2.debug(`Not using a per-language CodeQL bundle since ${reason}.`); return void 0; }; - if (!await features.getValue("per_language_bundles_v2" /* PerLanguageBundles */)) { - return explain("the feature is disabled"); - } if (otherLanguagePacksReason !== void 0) { return explain(otherLanguagePacksReason); } @@ -176417,7 +176410,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, othe ); } bundle = await getLatestNightlyBundle( - { env: getEnv(), features, logger: logger2 }, + { env: getEnv(), logger: logger2 }, rawLanguages, otherLanguagePacksReason, variant @@ -176584,17 +176577,14 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, othe compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; const action = { env: getEnv(), logger: logger2 }; const platform2 = getBundlePlatform(); - const perLanguageBundleLanguage = await getPerLanguageBundleLanguage( - { ...action, features }, - { - rawLanguages, - otherLanguagePacksReason, - cliVersion: cliVersion2, - compressionMethod, - platform: platform2, - variant - } - ); + const perLanguageBundleLanguage = getPerLanguageBundleLanguage(action, { + rawLanguages, + otherLanguagePacksReason, + cliVersion: cliVersion2, + compressionMethod, + platform: platform2, + variant + }); const resolveBundleURL = (language) => getCodeQLAssetDownloadURL( action, apiDetails, @@ -176869,7 +176859,7 @@ async function getLatestNightlyBundle(action, rawLanguages, otherLanguagePacksRe zstdAvailability.available ) ? "zstd" : "gzip"; const platform2 = getBundlePlatform(); - const language = await getPerLanguageBundleLanguage(action, { + const language = getPerLanguageBundleLanguage(action, { rawLanguages, otherLanguagePacksReason, cliVersion: void 0, diff --git a/src/per-language-bundles.test.ts b/src/per-language-bundles.test.ts index 09500d2f77..6998892507 100644 --- a/src/per-language-bundles.test.ts +++ b/src/per-language-bundles.test.ts @@ -1,7 +1,6 @@ import test from "ava"; import { ActionsEnvVars } from "./environment"; -import { Feature } from "./feature-flags"; import { BuiltInLanguage } from "./languages"; import { getOtherLanguagePacksReason, @@ -12,7 +11,6 @@ import { } from "./per-language-bundles"; import { BundlePlatform } from "./platform"; import { - createFeatures, getRecordingLogger, getTestEnv, initAllState, @@ -40,7 +38,6 @@ async function checkEligibility( env: getTestEnv({ [ActionsEnvVars.RUNNER_ENVIRONMENT]: "github-hosted", }), - features: createFeatures([Feature.PerLanguageBundles]), ...stateOverrides, }), { ...ELIGIBLE_OPTIONS, ...overrides }, @@ -145,27 +142,6 @@ test("getPerLanguageBundleLanguage requires a supported release version", async t.is(await checkEligibility({ cliVersion: "2.27.1" }), BuiltInLanguage.java); }); -test("getPerLanguageBundleLanguage requires the feature flag", async (t) => { - t.is(await checkEligibility({}, { features: createFeatures([]) }), undefined); -}); - -test("getPerLanguageBundleLanguage explains a disabled feature before checking eligibility", async (t) => { - const messages: LoggedMessage[] = []; - const language = await getPerLanguageBundleLanguage( - initAllState({ - features: createFeatures([]), - logger: getRecordingLogger(messages, { logToConsole: false }), - }), - { ...ELIGIBLE_OPTIONS, rawLanguages: undefined, cliVersion: undefined }, - ); - - t.is(language, undefined); - t.deepEqual( - messages.map((message) => message.message), - ["Not using a per-language CodeQL bundle since the feature is disabled."], - ); -}); - test("getPerLanguageBundleLanguage skips only the release version check for the latest nightly", async (t) => { const nightly = { isLatestNightly: true, cliVersion: undefined }; t.is(await checkEligibility(nightly), BuiltInLanguage.java); @@ -181,10 +157,6 @@ test("getPerLanguageBundleLanguage skips only the release version check for the ]) { t.is(await checkEligibility({ ...nightly, ...overrides }), undefined); } - t.is( - await checkEligibility(nightly, { features: createFeatures([]) }), - undefined, - ); t.is( await checkEligibility(nightly, { env: getTestEnv({ [ActionsEnvVars.RUNNER_ENVIRONMENT]: "self-hosted" }), diff --git a/src/per-language-bundles.ts b/src/per-language-bundles.ts index d8fcca96dd..db70c808bc 100644 --- a/src/per-language-bundles.ts +++ b/src/per-language-bundles.ts @@ -9,7 +9,6 @@ import { QuerySpec, UserConfig, } from "./config/db-config"; -import { Feature } from "./feature-flags"; import { RepositoryPropertyName } from "./feature-flags/properties"; import { BuiltInLanguage, parseBuiltInLanguage } from "./languages"; import { BundlePlatform } from "./platform"; @@ -139,14 +138,10 @@ export interface PerLanguageBundleOptions { } /** Returns the eligible bundle language, or undefined for the combined bundle. */ -export async function getPerLanguageBundleLanguage( - { - env, - features, - logger, - }: ActionState<["Logger", "ReadOnlyEnv", "FeatureFlags"]>, +export function getPerLanguageBundleLanguage( + { env, logger }: ActionState<["Logger", "ReadOnlyEnv"]>, options: PerLanguageBundleOptions, -): Promise { +): BuiltInLanguage | undefined { const { rawLanguages, otherLanguagePacksReason, @@ -162,10 +157,6 @@ export async function getPerLanguageBundleLanguage( return undefined; }; - if (!(await features.getValue(Feature.PerLanguageBundles))) { - return explain("the feature is disabled"); - } - // A defined reason means the CodeQL CLI may need packs for other languages, for example because // of the configured queries. That applies whichever languages were requested, so check it first // to avoid suggesting that requesting a single language would be enough. diff --git a/src/setup-codeql.test.ts b/src/setup-codeql.test.ts index 7dfac19148..780586ddf9 100644 --- a/src/setup-codeql.test.ts +++ b/src/setup-codeql.test.ts @@ -439,7 +439,7 @@ test.serial( tmpDir, GitHubVariant.DOTCOM, SAMPLE_DEFAULT_CLI_VERSION, - ["javascript"], + undefined, // rawLanguages undefined, // otherLanguagePacksReason false, // useOverlayAwareDefaultCliVersion features, @@ -633,7 +633,7 @@ for (const toolsInput of ["nightly", "nightly-latest"]) { SAMPLE_DOTCOM_API_DETAILS, GitHubVariant.DOTCOM, true, // tarSupportsZstd - createFeatures([Feature.PerLanguageBundles]), + createFeatures([]), getRunnerLogger(true), ); @@ -664,24 +664,16 @@ test.serial( await withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); - for (const { languages, otherLanguagePacksReason, features } of [ - // The per-language feature is disabled. - { - languages: ["java"], - otherLanguagePacksReason: undefined, - features: createFeatures([]), - }, + for (const { languages, otherLanguagePacksReason } of [ // More than one language requires a combined bundle. { languages: ["java", "python"], otherLanguagePacksReason: undefined, - features: createFeatures([Feature.PerLanguageBundles]), }, // The configured queries may need library packs for other languages. { languages: ["java"], otherLanguagePacksReason: "an example reason", - features: createFeatures([Feature.PerLanguageBundles]), }, ]) { const source = await setupCodeql.getCodeQLSource( @@ -693,7 +685,7 @@ test.serial( SAMPLE_DOTCOM_API_DETAILS, GitHubVariant.DOTCOM, true, // tarSupportsZstd - features, + createFeatures([]), getRunnerLogger(true), ); @@ -709,58 +701,48 @@ test.serial( }, ); -for (const perLanguageBundles of [false, true]) { - test.serial( - `getCodeQLSource uses the latest ${perLanguageBundles ? "per-language" : "combined"} bundle for a forced nightly`, - async (t) => { - const expectedTag = "codeql-bundle-30260213"; - const baseURL = `https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/${expectedTag}`; - const latestNightlyRequest = stubHostedNightly(expectedTag); +test.serial( + "getCodeQLSource uses the latest per-language bundle for a forced nightly", + async (t) => { + const expectedTag = "codeql-bundle-30260213"; + const baseURL = `https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/${expectedTag}`; + const latestNightlyRequest = stubHostedNightly(expectedTag); - await withTmpDir(async (tmpDir) => { - setupActionsVars(tmpDir, tmpDir, { GITHUB_EVENT_NAME: "dynamic" }); - const source = await setupCodeql.getCodeQLSource( - undefined, // toolsInput: the nightly is selected by ForceNightly - SAMPLE_DEFAULT_CLI_VERSION, - ["java"], - undefined, // otherLanguagePacksReason - false, // useOverlayAwareDefaultCliVersion - SAMPLE_DOTCOM_API_DETAILS, - GitHubVariant.DOTCOM, - true, // tarSupportsZstd - createFeatures( - perLanguageBundles - ? [Feature.ForceNightly, Feature.PerLanguageBundles] - : [Feature.ForceNightly], - ), - getRunnerLogger(true), - ); + await withTmpDir(async (tmpDir) => { + setupActionsVars(tmpDir, tmpDir, { GITHUB_EVENT_NAME: "dynamic" }); + const source = await setupCodeql.getCodeQLSource( + undefined, // toolsInput: the nightly is selected by ForceNightly + SAMPLE_DEFAULT_CLI_VERSION, + ["java"], + undefined, // otherLanguagePacksReason + false, // useOverlayAwareDefaultCliVersion + SAMPLE_DOTCOM_API_DETAILS, + GitHubVariant.DOTCOM, + true, // tarSupportsZstd + createFeatures([Feature.ForceNightly]), + getRunnerLogger(true), + ); - t.is(source.sourceType, "download"); - t.true(latestNightlyRequest.calledOnce); - if (source.sourceType === "download") { - const combinedURL = `${baseURL}/codeql-bundle-linux64.tar.zst`; - t.deepEqual( - source.bundle, - perLanguageBundles - ? { - kind: "per-language", - language: BuiltInLanguage.java, - url: `${baseURL}/codeql-bundle-java-linux64.tar.zst`, - combinedBundleURL: combinedURL, - } - : { kind: "combined", url: combinedURL }, - ); - } - }); - }, - ); -} + t.is(source.sourceType, "download"); + t.true(latestNightlyRequest.calledOnce); + if (source.sourceType === "download") { + t.deepEqual(source.bundle, { + kind: "per-language", + language: BuiltInLanguage.java, + url: `${baseURL}/codeql-bundle-java-linux64.tar.zst`, + combinedBundleURL: `${baseURL}/codeql-bundle-linux64.tar.zst`, + }); + } + }); + }, +); for (const date of ["20200101", "30260213"]) { for (const bundle of ["combined", "per-language"] as const) { test.serial( - `getCodeQLSource preserves an explicit ${bundle} nightly URL for ${date}`, + `getCodeQLSource preserves an explicit ${bundle} nightly URL for ${date}${ + bundle === "per-language" ? " on GHES" : "" + }`, async (t) => { const latestNightlyRequest = stubHostedNightly( "codeql-bundle-30260213", @@ -770,7 +752,9 @@ for (const date of ["20200101", "30260213"]) { ? "codeql-bundle-linux64.tar.zst" : "codeql-bundle-java-linux64.tar.zst"; const url = `https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-${date}/${asset}`; - const features = createFeatures([Feature.PerLanguageBundles]); + const features = createFeatures([]); + const variant = + bundle === "per-language" ? GitHubVariant.GHES : GitHubVariant.DOTCOM; const logger = getRecordingLogger([], { logToConsole: false }); const error = new HTTPError("Not Found", 404); const extractStub = sinon @@ -786,7 +770,7 @@ for (const date of ["20200101", "30260213"]) { undefined, // otherLanguagePacksReason false, SAMPLE_DOTCOM_API_DETAILS, - GitHubVariant.DOTCOM, + variant, true, features, logger, @@ -808,7 +792,7 @@ for (const date of ["20200101", "30260213"]) { url, SAMPLE_DOTCOM_API_DETAILS, tmpDir, - GitHubVariant.DOTCOM, + variant, SAMPLE_DEFAULT_CLI_VERSION, ["java"], undefined, // otherLanguagePacksReason @@ -1174,7 +1158,7 @@ test.serial( SAMPLE_DOTCOM_API_DETAILS, GitHubVariant.DOTCOM, true, // tarSupportsZstd - createFeatures([Feature.PerLanguageBundles]), + createFeatures([]), getRunnerLogger(true), ); @@ -1207,13 +1191,16 @@ test.serial( await withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); - for (const { otherLanguagePacksReason, features } of [ - // The per-language feature is disabled. - { otherLanguagePacksReason: undefined, features: createFeatures([]) }, + for (const { otherLanguagePacksReason, variant } of [ + // Automatic per-language selection is limited to GitHub.com. + { + otherLanguagePacksReason: undefined, + variant: GitHubVariant.GHES, + }, // The configured queries may need library packs for other languages. { otherLanguagePacksReason: "an example reason", - features: createFeatures([Feature.PerLanguageBundles]), + variant: GitHubVariant.DOTCOM, }, ]) { const source = await setupCodeql.getCodeQLSource( @@ -1223,9 +1210,9 @@ test.serial( otherLanguagePacksReason, false, // useOverlayAwareDefaultCliVersion SAMPLE_DOTCOM_API_DETAILS, - GitHubVariant.DOTCOM, + variant, true, // tarSupportsZstd - features, + createFeatures([]), getRunnerLogger(true), ); @@ -1295,7 +1282,7 @@ for (const fallback of [false, true]) { ["java"], undefined, // otherLanguagePacksReason false, // useOverlayAwareDefaultCliVersion - createFeatures([Feature.PerLanguageBundles]), + createFeatures([]), getRunnerLogger(true), ); @@ -1375,7 +1362,7 @@ for (const bundle of ["per-language", "combined", "fallback"] as const) { }; }); const addDiagnostic = sinon.stub(diagnostics, "addNoLanguageDiagnostic"); - const features = createFeatures([Feature.PerLanguageBundles]); + const features = createFeatures([]); await withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); @@ -1560,7 +1547,7 @@ for (const error of [ ["java"], undefined, // otherLanguagePacksReason false, // useOverlayAwareDefaultCliVersion - createFeatures([Feature.PerLanguageBundles]), + createFeatures([]), getRunnerLogger(true), ), { is: error }, diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index b4d7416a17..ad17aaa380 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -408,7 +408,7 @@ export async function getCodeQLSource( ); } bundle = await getLatestNightlyBundle( - { env: getEnv(), features, logger }, + { env: getEnv(), logger }, rawLanguages, otherLanguagePacksReason, variant, @@ -651,17 +651,14 @@ export async function getCodeQLSource( const action = { env: getEnv(), logger }; const platform = getBundlePlatform(); - const perLanguageBundleLanguage = await getPerLanguageBundleLanguage( - { ...action, features }, - { - rawLanguages, - otherLanguagePacksReason, - cliVersion, - compressionMethod, - platform, - variant, - }, - ); + const perLanguageBundleLanguage = getPerLanguageBundleLanguage(action, { + rawLanguages, + otherLanguagePacksReason, + cliVersion, + compressionMethod, + platform, + variant, + }); // Resolves the combined or per-language bundle URL for the requested release. const resolveBundleURL = (language?: BuiltInLanguage) => @@ -1089,7 +1086,7 @@ function getTempExtractionDir(tempDir: string) { * Records the combined bundle URL from that release for use if the selected asset is missing. */ async function getLatestNightlyBundle( - action: ActionState<["Logger", "ReadOnlyEnv", "FeatureFlags"]>, + action: ActionState<["Logger", "ReadOnlyEnv"]>, rawLanguages: string[] | undefined, otherLanguagePacksReason: string | undefined, variant: util.GitHubVariant, @@ -1105,7 +1102,7 @@ async function getLatestNightlyBundle( : "gzip"; const platform = getBundlePlatform(); - const language = await getPerLanguageBundleLanguage(action, { + const language = getPerLanguageBundleLanguage(action, { rawLanguages, otherLanguagePacksReason, cliVersion: undefined, From 2d688502143ec04609ef78940a0c57639b030d14 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 16 Oct 2026 14:00:39 +0100 Subject: [PATCH 3/3] Remove per-language bundle rollout flag Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d9f196d4-6d15-44ca-bd01-cd022d57d2cc --- .../workflows/__export-file-baseline-information.yml | 1 - .github/workflows/__per-language-bundle-validation.yml | 1 - lib/entry-points.js | 5 ----- pr-checks/checks/export-file-baseline-information.yml | 1 - pr-checks/checks/per-language-bundle-validation.yml | 2 -- src/feature-flags.ts | 10 ---------- 6 files changed, 20 deletions(-) diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 7badf827f1..13d15fb6d4 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -129,5 +129,4 @@ jobs: env: CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS: false CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true CODEQL_ACTION_TEST_MODE: true diff --git a/.github/workflows/__per-language-bundle-validation.yml b/.github/workflows/__per-language-bundle-validation.yml index 07930b35ab..c320f2199b 100644 --- a/.github/workflows/__per-language-bundle-validation.yml +++ b/.github/workflows/__per-language-bundle-validation.yml @@ -167,5 +167,4 @@ jobs: fi echo "Created a ${LANGUAGE} database at ${database}." env: - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true CODEQL_ACTION_TEST_MODE: true diff --git a/lib/entry-points.js b/lib/entry-points.js index dfa3adefcb..8d9d423bef 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -172145,11 +172145,6 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_SKIP_RESOURCE_CHECKS", minimumVersion: void 0 }, - ["per_language_bundles_v2" /* PerLanguageBundles */]: { - defaultValue: false, - envVar: "CODEQL_ACTION_PER_LANGUAGE_BUNDLES", - minimumVersion: void 0 - }, ["qa_telemetry_enabled" /* QaTelemetryEnabled */]: { defaultValue: false, envVar: "CODEQL_ACTION_QA_TELEMETRY", diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index 87c4b7609b..dd8325717b 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -11,7 +11,6 @@ installDotNet: true env: CODEQL_ACTION_SKIP_FILE_COVERAGE_ON_PRS: false CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true steps: - uses: ./../action/init id: init diff --git a/pr-checks/checks/per-language-bundle-validation.yml b/pr-checks/checks/per-language-bundle-validation.yml index ac22f67f50..fc9805af90 100644 --- a/pr-checks/checks/per-language-bundle-validation.yml +++ b/pr-checks/checks/per-language-bundle-validation.yml @@ -40,8 +40,6 @@ matrix: os: macos-latest-xlarge version: linked build-mode: autobuild -env: - CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true steps: - name: Remove CodeQL from toolcache uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 5cf7c7414c..b43f23c5d4 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -159,11 +159,6 @@ export enum Feature { OverlayAnalysisStatusCheck = "overlay_analysis_status_check", /** Controls whether overlay build failures on the default branch are stored in the Actions cache. */ OverlayAnalysisStatusSave = "overlay_analysis_status_save", - /** - * Controls whether we may download a bundle containing only the single language being analysed, - * rather than the combined bundle that contains every language. - */ - PerLanguageBundles = "per_language_bundles_v2", QaTelemetryEnabled = "qa_telemetry_enabled", /** Routes (some) API requests through the registry proxy. */ ProxyApiRequests = "proxy_api_requests", @@ -429,11 +424,6 @@ export const featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_SKIP_RESOURCE_CHECKS", minimumVersion: undefined, }, - [Feature.PerLanguageBundles]: { - defaultValue: false, - envVar: "CODEQL_ACTION_PER_LANGUAGE_BUNDLES", - minimumVersion: undefined, - }, [Feature.QaTelemetryEnabled]: { defaultValue: false, envVar: "CODEQL_ACTION_QA_TELEMETRY",