Commit Graph

3692 Commits

Author SHA1 Message Date
Mario Campos
895ffe7eb5 Front-load caching and rear-load saving to disk
This implementation saves CPU and I/O by not trying to write to the file on every set-cache.
2026-06-19 17:45:48 -05:00
Mario Campos
805b59092e Remove duplicate key check in cacheCommandOutput and related tests
This key-check is unnecessary because this function is only ever called if the key does NOT exist in the cache already. In that case, why check again?
2026-06-19 16:29:52 -05:00
Mario Campos
d1bd5ec7b0 Add logging for command cache file read/write failures 2026-06-19 16:07:35 -05:00
Mario Campos
94b12602ac Refactor cache file reading to check for existence before attempting to read 2026-06-19 15:41:47 -05:00
Mario Campos
126166c212 Rename CacheEntry to CommandCacheEntry for consistency 2026-06-19 15:07:56 -05:00
Mario Campos
dd7ff30205 Replace string with CommandCacheKey for better type safety 2026-06-19 15:04:22 -05:00
Mario Campos
420c97eadd Improve documentation for cache file and command keys in CLI 2026-06-19 14:12:27 -05:00
Mario Campos
defcf1bff6 Rename optional and undefinable functions for clarity; update related schemas to use optionalOrNull 2026-06-19 13:55:56 -05:00
Mario Campos
c8e32e423d Refactor resolveLanguages() to cache output according to CLI feature support
The output of `resolveLanguages()` can vary based on whether the flag `--filter-to-languages-with-queries` is included, but not all versions of the CLI support that. This makes caching a single execution problematic, so I opted to cache it based on whether it's supported. If it's supported, it's used; otherwise, it's not.
2026-06-18 14:46:44 -05:00
Mario Campos
553eef0d3f Add error handling for undefined extractors in language resolution 2026-06-18 10:36:50 -05:00
Mario Campos
b18df17ee7 Rebased onto main; fixups were needed 2026-06-18 10:25:23 -05:00
Mario Campos
a602287f73 Refactor CLI caching with in-memory and file storage 2026-06-18 10:10:46 -05:00
Mario Campos
dc8e1e9aa0 Refactor CLI JSON handling into a dedicated runCliJson function 2026-06-18 10:05:20 -05:00
Mario Campos
889ae42672 Refactor CLI executions into helper functions
This provides a separation of concerns between the memoization and the execution.
2026-06-18 10:02:31 -05:00
Mario Campos
587fcb33c7 Refactor isVersionInfo() to use json` module 2026-06-18 09:58:23 -05:00
Mario Campos
445107e23a Validate numbers, objects, and undefinables in the json module
This commit adds a `number` validator`, an `object` validator, an `isNumber` predicate, and `undefinable()` to test optional-but-not-null properties.
2026-06-18 09:58:23 -05:00
Mario Campos
6010f85d81 Reimplement resolveExtractor() as wrapper over resolveLanguages()
By wrapping `resolveLanguages()`, which is memoized, we can avoid executing `codeql resolve extractor` several times over the course of an analysis.
2026-06-18 09:58:23 -05:00
Mario Campos
311292c28f Cache the output of codeql resolve languages
Repeated calls to `resolveLanguages()` will only pay the performance penalty of executing `codeql resolve languages` once.
2026-06-18 09:58:20 -05:00
Michael B. Gale
b3b14d6671 Merge branch 'main' into mbg/ff/remove/StartProxyRemoveUnusedRegistries 2026-06-18 14:29:55 +01:00
Michael B. Gale
52077a03d9 Ignore empty repository property 2026-06-17 15:18:14 +01:00
Michael B. Gale
b2cc23e25d Log input choice 2026-06-16 14:19:37 +01:00
Michael B. Gale
82036913c8 Accept repository property as fallback 2026-06-16 12:28:17 +02:00
Michael B. Gale
ae7c3ea645 Add getConfigFileInput function 2026-06-16 12:21:33 +02:00
Michael B. Gale
a0276b7dc4 Add initial ActionsEnv abstraction 2026-06-16 12:19:30 +02:00
Michael B. Gale
f57d3726c3 Add github-codeql-config-file property 2026-06-16 12:02:08 +02:00
Henry Mercer
eda5730a8b Merge pull request #3955 from github/henrymercer/fix-nested-log-group
Fix broken log grouping due to nested log group
2026-06-05 13:53:30 +00:00
Henry Mercer
ddef289289 Remove one extractor per language assumption 2026-06-05 13:01:12 +01:00
Henry Mercer
99576d59b9 Fix broken log grouping due to nested log group 2026-06-05 12:57:29 +01:00
Henry Mercer
72b0f9fed4 Clean up codeql.resolveLanguages
Only the betterjson option is now used, so remove the old version.
2026-06-05 12:50:57 +01:00
github-actions[bot]
62953c18b3 Update default bundle to codeql-bundle-v2.25.6 2026-06-04 10:42:59 +00:00
Robert
cb1a588b02 Merge pull request #3937 from github/robertbrignull/waitForProcessing_backoff
Change waitForProcessing to use exponential backoff
2026-06-04 10:06:49 +00:00
Henry Mercer
ba47406412 Merge pull request #3943 from github/henrymercer/cache-cli-version-info
Cache CLI version information across Actions steps
2026-06-04 09:58:34 +00:00
Henry Mercer
5be8119767 Merge pull request #3938 from github/henrymercer/git-client-feature-flag
Add FF to force JGit-based Git backend
2026-06-04 09:58:15 +00:00
Robert
6047ac775f Merge branch 'main' into robertbrignull/waitForProcessing_backoff 2026-06-04 10:35:04 +01:00
Henry Mercer
5ccef82244 Address review comments 2026-06-03 18:31:11 +01:00
Henry Mercer
bab673d0e0 Cache CLI version information across Actions steps 2026-06-02 19:27:05 +01:00
Robert
d40e417f3c Only do initial wait when not running tests 2026-06-01 16:43:42 +01:00
Henry Mercer
524532393a Disable missing diff-ranges fallback when overlay enabled manually 2026-06-01 15:34:08 +01:00
Henry Mercer
948a63aed1 Add FF to force JGit-based Git backend 2026-06-01 15:20:13 +01:00
Robert
dfc14113e3 Change waitForProcessing to use exponential backoff 2026-05-28 11:15:07 +01:00
github-actions[bot]
8b0c522441 Update supported GitHub Enterprise Server versions 2026-05-27 00:44:49 +00:00
github-actions[bot]
2dc40cec39 Update default bundle to codeql-bundle-v2.25.5 2026-05-22 10:18:43 +00:00
Henry Mercer
f4d0a7abf7 Merge pull request #3912 from github/henrymercer/smaller-upload-lib
Action size: Reduce duplication between `upload-lib` and `entry-points`
2026-05-19 18:55:28 +00:00
Henry Mercer
2a7340616e Address review comments 2026-05-19 19:41:51 +01:00
Michael B. Gale
0a7280a837 Assert that nothing is logged 2026-05-19 14:22:23 +01:00
Michael B. Gale
b79a976789 Merge remote-tracking branch 'origin/main' into mbg/analysis-kinds/warn-on-non-cs-advanced-setup 2026-05-19 14:18:19 +01:00
Michael B. Gale
3dc99aad86 Default to StartProxyRemoveUnusedRegistries behaviour 2026-05-18 16:17:15 +01:00
Henry Mercer
05e8f288eb Merge branch 'main' into henrymercer/require-codeql-2.19.4 2026-05-15 18:13:43 +01:00
Henry Mercer
5b815f25ca Merge branch 'main' into henrymercer/sha256 2026-05-15 14:58:14 +01:00
Henry Mercer
b43bb7bd69 Merge branch 'main' into henrymercer/sha256 2026-05-15 11:41:47 +01:00