Commit Graph

52 Commits

Author SHA1 Message Date
Michael B. Gale
f4a15a13fd Try to load failed config if normal config is unavailable
Adapt relevant functions by narrowing their types or skipping steps that would otherwise have been skipped as well
2026-10-12 13:07:48 +01:00
Henry Mercer
ae96eed5bb Merge remote-tracking branch 'origin/main' into henrymercer/require-codeql-2-20-7
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-12 10:11:02 +01:00
Michael B. Gale
d6196d8703 Rename exportVariable wrapper to exportEnvVar 2026-10-08 20:06:51 +01:00
Michael B. Gale
1728f0c676 Add wrapper around core.exportVariable 2026-10-07 20:12:00 +01:00
Henry Mercer
3c1b1b65a3 Remove CodeQL version check from debug artifact upload
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-07 14:41:03 +01:00
Michael B. Gale
711c19c2dc Use ZipArchive instead of archive("zip") 2026-06-18 14:24:11 +01:00
github-actions[bot]
1848b73afa Rebuild 2026-05-06 18:01:54 +00:00
Michael B. Gale
048d0ea295 Address review comments 2026-03-10 15:54:58 +00:00
Henry Mercer
5c583bbb19 Include diagnostics in bundle 2026-02-17 15:55:02 +00:00
Michael B. Gale
9483bd5a7f Check that matrixObject is an object 2026-01-20 13:51:59 +00:00
Michael B. Gale
1ac62705ed Change log message to warning 2026-01-20 13:25:25 +00:00
Michael B. Gale
9a57e78a04 Improving sorting of matrix keys 2026-01-20 13:21:16 +00:00
Michael B. Gale
13eb1818b9 Refactor generic part of uploadDebugArtifacts into uploadArtifacts 2026-01-20 12:49:19 +00:00
Michael B. Gale
69173ea009 Refactor artifact suffix computation into getArtifactSuffix 2026-01-20 12:41:22 +00:00
Henry Mercer
f28848a66a Use artifact scanner in debug artifacts PR checks 2025-12-17 10:25:47 +00:00
Henry Mercer
41c0a26213 Use Node fs APIs instead of del 2025-10-28 13:00:25 +00:00
Michael B. Gale
ad086e4d90 Use path.extname for some extension checks 2025-09-30 11:55:04 +01:00
Henry Mercer
09839488db Update del 2025-08-29 19:22:46 +01:00
Henry Mercer
f8c2086872 Prefer providing CodeQL via dependency injection 2025-08-07 12:16:00 +01:00
Michael B. Gale
1eab40885f Fix backslashes being accepted by sanitizeArtifactName 2025-06-04 12:28:25 +01:00
Andrew Eisenberg
a8be43c24e Don't throw error for ENOENT 2025-04-04 13:42:00 -07:00
Henry Mercer
56feaac968 Raise file limit in debug artifacts by using zip64 2025-04-04 14:40:53 +01:00
Henry Mercer
3df6d20d31 Improve logs for combined SARIF debug artifact
Don't start a "Uploading combined SARIF debug artifact" log group if we aren't going to do the upload.
2025-02-12 16:27:40 +00:00
Andrew Eisenberg
f71067bd5f Stop using feature-flag support for determining if a feature is active
Using the feature flag mechanism for checking if uploads are enabled was
too clunky. I'm moving the change to checking versions directly.
2025-01-26 13:42:15 -08:00
Andrew Eisenberg
2bab9f7984 Ensure artifacts are only uploaded in safe situations
This commit:

Turns on uploading of artifacts again but only if CLI version is
>= 2.20.3. I implemented the check using our feature flag functionality.
I was on the fence about this since it makes the PR more complex.
However, it does give us more flexibility when controlling artifact
uploads.

Also, I renamed the two workflows that were previously disabled. This
way we will not accidentally enable the old workflows for previous
versions of the action.
2025-01-25 15:31:35 -08:00
Angela P Wen
519de26711 Temporarily disable uploading debug artifacts 2025-01-22 10:35:38 -08:00
Angela P Wen
87548a27e8 Stop using the artifact_v4_upgrade feature flag 2024-12-04 12:05:11 -08:00
Angela P Wen
a196a714b8 Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
2024-10-01 09:59:05 -07:00
Henry Mercer
6e24973d7a Improve logging for combined SARIF debug artifact 2024-09-17 11:15:08 +02:00
Henry Mercer
d0a3cf2152 Improve logging for debug artifacts 2024-09-17 11:08:27 +02:00
Henry Mercer
78d398ebc6 Improve docs and method naming 2024-09-17 10:58:00 +02:00
Henry Mercer
213bf3678c Improve documentation 2024-09-16 23:05:17 +02:00
Henry Mercer
dd7307d603 Refactoring: Simplify retrieving error message 2024-09-16 22:38:35 +02:00
Henry Mercer
bbd7c801a0 Fall back to partial database bundle if CLI command fails 2024-09-16 22:29:11 +02:00
Henry Mercer
80d7a6c8d4 Tolerate failures in uploading debug artifacts 2024-09-16 22:20:22 +02:00
Henry Mercer
d061f2cdd0 Handle CLI errors when creating debug artifacts 2024-09-16 18:39:39 +02:00
Angela P Wen
bc660fcf8c Copy SARIF file to database location rather than move 2024-09-12 12:58:13 -07:00
Angela P Wen
e7716806b8 Rename upload-debug-artifacts to combined-sarif-artifacts
More accurately describes what these artifacts are, rather than the step they're uploaded in.
2024-09-12 12:56:38 -07:00
Angela P Wen
cb7faf53f6 Refactor: move combined SARIF debug artifact logic to debug-artifact 2024-09-12 12:55:49 -07:00
Angela P Wen
d4bfd40513 Use .push rather than .concat 2024-09-11 16:37:04 -07:00
Angela P Wen
b296f2676c Refactor: upload all available debug artifacts in init-post
Previously, we uploaded SARIF artifacts in the `analyze-post` step and database and log artifacts in the `init-post` step. As we migrate to the updated `artifact` dependencies, we want to switch to uploading all artifacts in one step.

In order to upload all artifacts in one go and maintain the artifacts at the root of the debug directory, we first move SARIF artifacts to the database directory. This should not affect any other consumers of the SARIF file as this occurs in the `init-post` step.
2024-09-11 15:09:29 -07:00
Henry Mercer
ecb9ccfcb1 Fix new linter errors 2024-08-05 19:22:26 +01:00
Andrew Eisenberg
950748204e Avoid failing when debug artifacts can't be uploaded
Failing to upload debug artifacts should not fail the action since
it is possible that the action has already succeeded by the time this
failure occurs.
2024-06-20 12:05:45 -07:00
Andrew Eisenberg
f5a82188bc Add a retention period of 7 days
For debug artifacts. Ensures they don't stick around
too long since these can be large.
2024-01-10 13:31:52 -08:00
Angela P Wen
8e0b1c74b1 Add continueOnError: true for debug artifact upload (#1895) 2023-09-19 15:10:13 -07:00
Angela P Wen
b16296be30 Auto-fix linting errors 2023-07-25 10:34:21 +02:00
Henry Mercer
d8fe76e161 Delete legacy tracing 2023-03-28 18:53:43 +01:00
Henry Mercer
10695e6a20 Fix linter errors 2023-01-18 21:00:05 +00:00
Angela P Wen
65d6ee0c51 Address review comments 2022-08-11 13:45:26 +02:00
Angela P Wen
7f86ddc26d Move debug log printing back to actions util 2022-08-02 12:41:08 +02:00