Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ec5eecb
Use per-language CodeQL bundles
henrymercer Sep 15, 2026
eb76062
Include failed bundle attempts in fallback timing
henrymercer Sep 15, 2026
289376d
Use per-language CodeQL bundles
henrymercer Sep 15, 2026
59ce3a2
Include failed bundle attempts in fallback timing
henrymercer Sep 15, 2026
2d47caf
Isolate per-language bundle eligibility state
henrymercer Sep 16, 2026
dfb9bf5
Share CodeQL bundle platform definitions
henrymercer Sep 16, 2026
f536ef4
Centralize CodeQL download telemetry fields
henrymercer Sep 16, 2026
2f552a9
Clarify bundle resolution and latest-nightly selection
henrymercer Sep 16, 2026
bd2ddba
Extract explicit CodeQL bundle URL classification
henrymercer Sep 16, 2026
89606bb
Return toolcache rejection reasons with Result
henrymercer Sep 16, 2026
f4fa111
Share elapsed-time rounding for bundle downloads
henrymercer Sep 16, 2026
69f4715
Use Result.orElse for bundle extraction paths
henrymercer Sep 16, 2026
5a2f29e
Merge published per-language bundle history
henrymercer Sep 16, 2026
28b8f59
Use shared test state for bundle eligibility
henrymercer Sep 17, 2026
ed3a24c
Group bundle eligibility test state overrides
henrymercer Sep 17, 2026
549d498
Simplify per-language platform eligibility checks
henrymercer Sep 17, 2026
ead1f7d
Rename the platform module
henrymercer Sep 17, 2026
79fe3a1
Move download telemetry into the status-report directory
henrymercer Sep 17, 2026
ecec9b5
Share per-language telemetry fields without renaming
henrymercer Sep 17, 2026
f18f353
Describe the bundle URL resolver
henrymercer Sep 17, 2026
07fa87d
Clarify the latest-nightly eligibility exception
henrymercer Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use shared test state for bundle eligibility
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
henrymercer and Copilot committed Sep 17, 2026
commit 28b8f598f5032f2f254105608a3df22bab2b8ae4
13 changes: 7 additions & 6 deletions src/per-language-bundles.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from "ava";

import { BundlePlatform } from "./bundle-platform";
import { ActionsEnvVars, ReadOnlyEnv } from "./environment";
import { ActionsEnvVars, Env } from "./environment";
import { Feature } from "./feature-flags";
import { BuiltInLanguage } from "./languages";
import {
Expand All @@ -13,6 +13,7 @@ import {
createFeatures,
getRecordingLogger,
getTestEnv,
initAllState,
LoggedMessage,
} from "./testing-utils";
import { GitHubVariant } from "./util";
Expand All @@ -30,16 +31,16 @@ const ELIGIBLE_OPTIONS: PerLanguageBundleOptions = {
async function checkEligibility(
overrides: Partial<PerLanguageBundleOptions>,
enabledFeatures: Feature[] = [Feature.PerLanguageBundles],
env: ReadOnlyEnv = getTestEnv({
env: Env = getTestEnv({
[ActionsEnvVars.RUNNER_ENVIRONMENT]: "github-hosted",
}),
) {
return getPerLanguageBundleLanguage(
Comment thread
mbg marked this conversation as resolved.
{
initAllState({
env,
features: createFeatures(enabledFeatures),
logger: getRecordingLogger([], { logToConsole: false }),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor: Not needed if you don't inspect the log output. initAllState will automatically initialise a logger.

},
}),
{ ...ELIGIBLE_OPTIONS, ...overrides },
);
}
Expand Down Expand Up @@ -130,11 +131,11 @@ test("getPerLanguageBundleLanguage requires the feature flag", async (t) => {
test("getPerLanguageBundleLanguage explains a disabled feature before checking eligibility", async (t) => {
const messages: LoggedMessage[] = [];
const language = await getPerLanguageBundleLanguage(
{
initAllState({
env: getTestEnv(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor: not required if it's not customised. initAllState will automatically call getTestEnv() to initialise env.

features: createFeatures([]),
logger: getRecordingLogger(messages, { logToConsole: false }),
},
}),
{ ...ELIGIBLE_OPTIONS, rawLanguages: undefined, cliVersion: undefined },
);

Expand Down