Commit Graph

10347 Commits

Author SHA1 Message Date
Henry Mercer
f8e73499b4 Use a per-language bundle from a nightly when one is asked for
Nightlies are the first bundles to contain per-language bundles, so
allow a workflow that explicitly asks for a nightly to use one. Their
tags record the date they were built rather than a version, so there is
no minimum version to check against; a nightly is always at least as new
as the first release to publish per-language bundles.

Only do this when a nightly was asked for explicitly. Nightlies can also
be forced for analyses that did not ask for one, and those should keep
getting the bundle that contains every language while the feature is
still being tested.

Fall back to the combined bundle from the same nightly if it turns out
not to contain the language, since we chose the bundle ourselves rather
than being asked for it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:54:57 +01:00
Henry Mercer
73491bfa12 Validate against codeql-bundle-20260908
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:25 +01:00
Henry Mercer
4e422c4b8e Validate against codeql-bundle-20260901 2026-09-09 12:53:25 +01:00
Henry Mercer
b40dfaea3a Validate the Swift bundle on a larger runner
Swift autobuild does not finish within the timeout on a standard macOS
runner, which is why the generated Swift checks use a larger one.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
e9f64a6f54 Do not infer how a bundle was downloaded from its durations
The reported durations do not distinguish a streaming attempt that failed
from one that was never made, since a bundle that is not Zstandard skips
streaming altogether. Telemetry from self-hosted Linux runners, which take
the download-then-extract path consistently rather than intermittently,
shows this is not a hypothetical case.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
4519edc232 Re-run per-language bundle validation after Actions incident 5229
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
cc807b741b Expect the Actions bundle to contain the JavaScript extractor
The Actions QL pack depends on the JavaScript one, which is the only
dependency of its kind, so the Actions bundle carries the JavaScript
extractor as well as its own. Let each language declare the extractors
its bundle is expected to contain, so that the check still fails if a
bundle contains anything beyond what its language needs.

Fold the generated Actions-only check into this workflow, which now
covers every language, and with it the ability for a generated check to
run on additional branches, which nothing needs any more.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
a1e61b1512 Validate every per-language CodeQL bundle
Checks that each per-language bundle is trimmed to the language it is
for, is kept out of the toolcache, and can build a database for that
language.

This is not generated from `pr-checks`, since each language needs its own
platform and build steps, which the generated checks cannot express.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
8847921389 Look for the bundle we downloaded in the toolcache
The runner image ships with its own copy of CodeQL in the toolcache, so
checking whether the toolcache contains CodeQL at all does not tell us
anything about the bundle this test downloaded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
b877f27829 Never add a per-language bundle to the toolcache
A bundle that contains a single language can also be requested directly
via the `tools` input, in which case we did not choose it but must still
keep it out of the toolcache, since a later job analyzing a different
language could otherwise pick up an installation that is missing the
extractor it needs.

Recognise such bundles by their name. When one was requested explicitly,
a missing bundle is an error rather than a reason to fall back, since
substituting a different bundle would ignore what was asked for.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:24 +01:00
Henry Mercer
a113a2b6d2 Run the per-language bundle check on its feature branch
Per-language bundles are not yet published as part of a release, so this
check points at a pre-release and needs exercising before it can run on
`main`. Allow a check to opt in to running on additional branches so that
it can be, without opening a pull request.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:23 +01:00
Henry Mercer
aa3f24b2eb Add a PR check for per-language CodeQL bundles
Checks that a bundle containing only a single language is both trimmed
and able to analyze that language. Uses the Actions bundle, since the
Actions QL pack is the only one that depends on the library pack of
another language, and so is the case most likely to be missing something
it needs.

The bundle is pinned to a specific pre-release, so this check will need
updating once per-language bundles are published as part of a release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:23 +01:00
Henry Mercer
b84b1e3854 Add support for per-language CodeQL bundles
Download a bundle containing only the single language being analyzed,
rather than the combined bundle that contains every language, when that
is both safe and beneficial. Per-language bundles are substantially
smaller, so this saves download time and disk space on the runner.

Eligibility is decided in one place, since it is easy for these
conditions to drift apart. Per-language bundles are never added to the
toolcache, because a bundle for one language must not be reused for a
job that analyzes another.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
2026-09-09 12:53:23 +01:00
Henry Mercer
977e6ceaea Merge pull request #4124 from github/henrymercer/toolcache-bundle-cleanup
Delete unused CodeQL bundles from the toolcache before downloading
codeql-bundle-v2.27.0
2026-09-08 17:04:25 +00:00
Henry Mercer
40a6b38247 Address toolcache cleanup review feedback
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-08 15:55:41 +01:00
Henry Mercer
deece8f852 Apply suggestion from @henrymercer 2026-09-07 14:08:36 +01:00
copilot-swe-agent[bot]
034db721dd Merge remote-tracking branch 'origin/main' into henrymercer/toolcache-bundle-cleanup
Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
2026-09-07 12:57:51 +00:00
Henry Mercer
313a0b9922 Merge pull request #4122 from github/henrymercer/friendly-potato
Don't record an overlay status when the job was cancelled
2026-09-04 16:55:52 +00:00
Henry Mercer
31da345c07 Address review comments
Delete each version directory individually so that a symlinked one is skipped rather than removed, take an `ActionState` so the environment is read through `ReadOnlyEnv` rather than the deprecated `getOptionalEnvVar`, let `deleteToolcacheBundles` report its own failure to locate the toolcache instead of having the caller catch it, quote paths in log messages, and rename `HAS_OBTAINED_CODEQL_TOOLS` to `HAS_SET_UP_CODEQL`, which is also set when we find the tools in the toolcache rather than downloading them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 17:43:40 +01:00
Henry Mercer
46dfb14111 Merge pull request #4123 from github/redsun82-address-pr-4072-comments
Analyze all supported languages in the Linux Arm64 check
2026-09-04 16:39:50 +00:00
Henry Mercer
e06b60f75f Merge pull request #4125 from github/henrymercer/merge-queue-sarif-upload-flake
Don't upload the ESLint SARIF from merge queue refs
2026-09-04 16:37:26 +00:00
Henry Mercer
a48f2d3077 Record an overlay status only for conclusive job statuses
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 17:33:02 +01:00
Henry Mercer
657964c39f Read the job status from a ReadOnlyEnv in recordOverlayStatus
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 17:31:24 +01:00
Henry Mercer
d2fe508a6d Don't upload the ESLint SARIF from merge queue refs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 17:22:52 +01:00
Paolo Tranquilli
16da74769e Log found databases in Linux Arm64 check
Log a success line for each language database found in the Linux Arm64 PR check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 12:27:23 +02:00
Henry Mercer
e13c3dc834 Only clean up a toolcache on the workspace filesystem
Some runner images keep the toolcache on a different volume to the workspace, so deleting the tools there frees up disk space that the analysis cannot use, and costs a later step that wanted them in the toolcache a download. Windows runners are laid out this way, with the toolcache on `C:` and the workspace on `D:`.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 11:00:56 +01:00
Henry Mercer
1331773b9a Address Copilot review feedback
Run the cleanup even when the download will not be cached in the toolcache, since the toolcache shares a filesystem with the directory we extract to, so freeing it helps either way, and report an error other than the toolcache being absent as a failure rather than as an empty toolcache.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:26:09 +01:00
Henry Mercer
2681b03bd6 Add a changelog note
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:18:43 +01:00
Henry Mercer
a7a90f3ffb Enable toolcache cleanup in the multi-language PR check
The check installs the tools from a URL, so most versions in its matrix are downloaded rather than found in the toolcache, which is when the cleanup runs, and it then builds and analyses seven languages, so a bundle we damaged on the way in would show up.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:12:11 +01:00
Henry Mercer
4a0b22ec25 Delete unused CodeQL bundles from the toolcache before downloading
When we download a bundle the toolcache often already holds a different one that the job will not use, and on GitHub-hosted runners it shares a filesystem with the workspace, so it takes space away from the analysis. Empty the toolcache before downloading, which also frees space for the archive during extraction, and which is safe because getting as far as a download means the tools were not resolved from the toolcache. Skip this once a step has obtained the tools, since a later step may run a path it was given, and gate it on the runner being GitHub-hosted and on a feature flag that is off by default.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:12:10 +01:00
Henry Mercer
762a5ed7f7 Add a helper to delete the CodeQL tools from the toolcache
`deleteToolcacheBundles` removes `$RUNNER_TOOL_CACHE/CodeQL` and reports which versions were there. It refuses to follow a symlinked CodeQL directory so that it can only ever delete paths that are really inside the toolcache, and reports failures rather than throwing. Not called yet.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:12:10 +01:00
Henry Mercer
ceb85f25b5 Distinguish GitHub-hosted runners from ones that look hosted
`isHostedRunner` infers hostedness from the runner name and the toolcache path, so it also matches self-hosted runners that are configured to resemble hosted ones. Rename it to `looksLikeHostedRunner` so callers can see they are getting a heuristic, and add `isGitHubHostedRunner`, which reads the `RUNNER_ENVIRONMENT` value the Actions service reports. The existing callers keep the heuristic, so there is no behaviour change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 10:12:09 +01:00
Henry Mercer
9fddc16f0d Merge pull request #4088 from github/dependabot/npm_and_yarn/octokit/plugin-rest-endpoint-methods-18.0.0
Bump @octokit/plugin-rest-endpoint-methods from 17.0.0 to 18.0.0
2026-09-04 07:23:47 +00:00
Paolo Tranquilli
36cbf13b5e Address review comments
- Analyze all languages CodeQL supports on Linux Arm64 (except Swift,
  which is macOS only) in the Linux Arm64 check, building the compiled
  ones via the shared multi-language-repo build.sh
- De-duplicate the check's language list via a shared LANGUAGES env var
  used by both the init input and the assert loop
- Fix CHANGELOG tense: "download" -> "downloads"

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-04 08:30:10 +02:00
Henry Mercer
38dd4a088a Don't record an overlay status when the job was cancelled
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-03 18:21:46 +01:00
Henry Mercer
2f3c1c964a Add an internal job-status input to the init Action
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-03 18:21:14 +01:00
Michael B. Gale
5914b031b1 Merge pull request #4111 from github/dependabot/github_actions/dot-github/workflows/actions/setup-java-6.0.0
Bump actions/setup-java from 5.7.0 to 6.0.0 in /.github/workflows
2026-09-03 16:50:30 +00:00
Michael B. Gale
102499482f Merge pull request #4119 from github/dependabot/npm_and_yarn/npm-minor-21ac56865f
Bump the npm-minor group across 1 directory with 2 updates
2026-09-03 16:22:14 +00:00
Michael B. Gale
9401a335a3 Merge pull request #4118 from github/dependabot/npm_and_yarn/browserslist-4.28.8
Bump browserslist from 4.24.2 to 4.28.8
2026-09-03 16:21:07 +00:00
Michael B. Gale
3ee8a9398b Merge branch 'main' into dependabot/npm_and_yarn/browserslist-4.28.8 2026-09-03 17:03:16 +01:00
Michael B. Gale
25da1b1495 Merge branch 'main' into dependabot/npm_and_yarn/npm-minor-21ac56865f 2026-09-03 17:00:00 +01:00
Michael B. Gale
9509fd0822 Merge pull request #4120 from github/dependabot/npm_and_yarn/eslint-plugin-jsdoc-64.2.1
Bump eslint-plugin-jsdoc from 62.9.0 to 64.2.1
2026-09-03 15:58:16 +00:00
Michael B. Gale
20ec60c2d9 Merge branch 'main' into dependabot/npm_and_yarn/eslint-plugin-jsdoc-64.2.1 2026-09-03 15:12:29 +01:00
Paolo Tranquilli
4cccb3aa86 Merge pull request #4072 from github/redsun82-linux-arm64-support
Add support for Linux Arm64 runners
2026-09-03 13:58:15 +00:00
github-actions[bot]
b724a86493 Rebuild 2026-09-02 17:56:48 +00:00
dependabot[bot]
2a03009e3f Bump eslint-plugin-jsdoc from 62.9.0 to 64.2.1
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 62.9.0 to 64.2.1.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v62.9.0...v64.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 64.2.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 17:55:01 +00:00
dependabot[bot]
da21771e2e Bump the npm-minor group across 1 directory with 2 updates
Bumps the npm-minor group with 2 updates in the / directory: [js-yaml](https://github.com/nodeca/js-yaml) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `js-yaml` from 5.3.0 to 5.4.0
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/5.3.0...5.4.0)

Updates `typescript-eslint` from 8.67.0 to 8.68.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.68.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor
- dependency-name: typescript-eslint
  dependency-version: 8.68.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 17:54:50 +00:00
dependabot[bot]
bb36f8049c Bump browserslist from 4.24.2 to 4.28.8
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.24.2 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.24.2...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 13:55:34 +00:00
Michael B. Gale
276e2ce25d Merge pull request #4117 from github/mbg/deps/1sep
Update dependencies
2026-09-02 13:39:31 +00:00
Michael B. Gale
ccd5275aa4 Merge branch 'main' into dependabot/github_actions/dot-github/workflows/actions/setup-java-6.0.0 2026-09-02 14:36:24 +01:00