Commit Graph

2533 Commits

Author SHA1 Message Date
Chuan-kai Lin c3bbcab41b Add downloadOverlayBaseDatabaseFromCache tests 2025-07-18 07:44:43 -07:00
Chuan-kai Lin e37b293334 Overlay: report overlay-base database stats 2025-07-18 07:44:22 -07:00
Chuan-kai Lin 19075c4376 Overlay: report overlay analysis mode 2025-07-18 07:18:38 -07:00
Chuan-kai Lin 3aef4108d1 Add diff-informed-analysis-utils.test.ts 2025-07-17 06:14:37 -07:00
Chuan-kai Lin 614b64c6ec Diff-informed analysis: disable for GHES below 3.19 2025-07-17 06:10:14 -07:00
Chuan-kai Lin aefb854fe5 Feature.DiffInformedQueries: default to true 2025-07-17 06:03:52 -07:00
Chuan-kai Lin 03a2a17e75 Merge pull request #2967 from github/cklin/overlay-feature-flags
Overlay: additional feature flags
2025-07-17 05:54:21 -07:00
Chuan-kai Lin 709cf22a66 Limit Code Scanning API to 25 features per request 2025-07-16 07:07:44 -07:00
Chuan-kai Lin 3eaefb4deb Replicate "too many feature flags" error in test 2025-07-16 07:06:52 -07:00
Koen Vlaswinkel e30db30685 Ignore pre-release parts when comparing GHES versions 2025-07-16 11:51:53 +02:00
Arthur Baars 15605b194f Make eslint happy 2025-07-15 07:31:22 +00:00
Arthur Baars ca53360d04 Fix tests 2025-07-15 07:25:49 +00:00
Koen Vlaswinkel 6f936b5c2d Merge pull request #2969 from github/koesie10/fix-ghes-version-parsing
Fix parsing of GHES pre-release versions
2025-07-14 13:42:48 +02:00
Koen Vlaswinkel c6a6c1490f Move comment to JSDoc 2025-07-14 13:18:38 +02:00
Michael B. Gale 4e20239e7b Merge pull request #2951 from github/update-supported-enterprise-server-versions
Update supported GitHub Enterprise Server versions
2025-07-14 10:39:53 +01:00
Koen Vlaswinkel 59d67fc4bf Fix parsing of GHES pre-release versions 2025-07-14 11:25:20 +02:00
Chuan-kai Lin b37e7e2c5d Move initializeFeatures() to testing-utils
This change eliminates the need for setup-codeql.test to import from
feature-flags.test, which makes the former run all tests defined in the
latter.
2025-07-11 09:54:40 -07:00
Chuan-kai Lin 90d7727554 Overlay: check code-scanning features 2025-07-10 14:16:19 -07:00
Chuan-kai Lin fb771764cb Extract generateCodeScanningConfig() 2025-07-10 14:14:46 -07:00
Chuan-kai Lin d799ff5e6a Overlay: check per-language features 2025-07-10 14:14:14 -07:00
Chuan-kai Lin 9f70a5fc86 Overlay: define language-specific features 2025-07-10 11:09:28 -07:00
Chuan-kai Lin 55cb6b8b94 Extract isOverlayAnalysisFeatureEnabled() 2025-07-10 10:48:43 -07:00
Chuan-kai Lin 4bdb7fe04f Overlay database mode tests: list features
Before we introduce additional features for controlling overlay analysis
enablement, change the unit tests to specify features directly instead
of through a isFeatureEnabled boolean field.
2025-07-10 10:46:32 -07:00
Chuan-kai Lin 64fce5856f Use exclude-from-incremental also for overlay analysis 2025-07-09 14:32:05 -07:00
Chuan-kai Lin fe7205c739 Move getOverlayDatabaseMode() call into initConfig()
In an upcoming change, getOverlayDatabaseMode() will depend on the
contents of Config. As a result, getOverlayDatabaseMode() needs to be
called after the rest of Config has already been populated.

This commit performs the refactoring to move the
getOverlayDatabaseMode() into initConfig(), after the rest of Config has
already been populated.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin 4cd7a721f7 Remove loadConfig()
The loadConfig() function is mostly the same as getDefaultConfig(),
except that it calls loadUserConfig() and stores the results in
originalUserInput.

This refactoring commit replaces the loadConfig() call with
getDefaultConfig() and loadUserConfig(), which allows deleting a large
amount of duplicated code.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin f4358b38d1 Extract loadUserConfig() 2025-07-09 14:32:05 -07:00
Koen Vlaswinkel f53ec7c550 Merge pull request #2961 from github/koesie10/disable-combine-sarif-files-ghes
Unconditionally disable combining SARIF files for GHES 3.18
2025-07-08 10:01:06 +02:00
Chuan-kai Lin 95a1b7e2bf Add getOverlayDatabaseMode() tests 2025-07-07 08:14:41 -07:00
Chuan-kai Lin 8c5122ea75 Add getPullRequestBranches() tests 2025-07-07 08:13:06 -07:00
Koen Vlaswinkel aafbeb29bc Unconditionally disable combining SARIF files for GHES 3.18 2025-07-04 15:24:36 +02:00
Chuan-kai Lin 6a51e635a5 Add "overlay" to SARIF incrementalMode run property 2025-07-03 12:35:25 -07:00
Chuan-kai Lin 42835b3971 Override cleanup-level for overlay-base database 2025-07-03 12:35:25 -07:00
Chuan-kai Lin 2fc04c80cc Download overlay-base database from actions cache 2025-07-03 12:35:25 -07:00
Chuan-kai Lin b95402dae1 Extract checkOverlayBaseDatabase() 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 6ca06f41c4 Upload overlay-base database to actions cache 2025-07-03 12:35:24 -07:00
Chuan-kai Lin d42ce71087 Add AugmentationProperties.useOverlayDatabaseCaching
This commit adds useOverlayDatabaseCaching to AugmentationProperties to
indicate whether the action should upload overlay-base databases to the
actions cache and to download a cached overlay-base database when
creating an overlay database.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin b4425372ef Limit OverlayAnalysis to internal repos 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 93e8729640 getOverlayDatabaseMode: use Feature.OverlayAnalysis
This commit changes getOverlayDatabaseMode so that, when
Feature.OverlayAnalysis is enabled, it calculates the overlay database
mode automatically based on analysis metadata. If we are analyzing the
default branch, use OverlayBase, and if we are analyzing a PR, use
Overlay.

If CODEQL_OVERLAY_DATABASE_MODE is set to a valid overlay database mode,
that environment variable still takes precedence.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin da758dc0cd Add Feature.OverlayAnalysis 2025-07-03 12:35:24 -07:00
Chuan-kai Lin 60a2a7d623 Add isAnalyzingPullRequest() 2025-07-03 12:35:24 -07:00
Chuan-kai Lin a336faa497 databaseInitCluster: use overlayDatabaseMode from config
This commit changes databaseInitCluster() to use overlayDatabaseMode
from AugmentationProperties instead of the overlayDatabaseMode
parameter. There is no behavior change because both overlayDatabaseMode
values are computed the same way.

The commit then cleans up the overlayDatabaseMode parameter and the code
paths that feed into it.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin ee8a8c4e0b config-utils: populate getOverlayDatabaseMode()
This commit populates getOverlayDatabaseMode() in config-utils with the
same code from getOverlayDatabaseMode() in init.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin 9022c7382c Add AugmentationProperties.overlayDatabaseMode
This commit adds overlayDatabaseMode to AugmentationProperties and
creates a placeholder getOverlayDatabaseMode() function, with the
necessary inputs, to populate it.
2025-07-03 12:35:24 -07:00
Michael B. Gale b69421388d Merge pull request #2956 from github/mbg/start-proxy/validation-improvements
Improve JSON validation in `start-proxy` action
2025-07-03 12:23:56 +01:00
Koen Vlaswinkel 612df8d91c Remove support for combining SARIF runs with non-unique categories 2025-07-01 15:20:28 +02:00
Michael B. Gale 9281048a40 Include goproxy_server in configuration filtering tests 2025-06-27 14:32:16 +01:00
Michael B. Gale 6b83dc33ed Check for null in addition to undefined; extend tests accordingly 2025-06-27 14:32:16 +01:00
Michael B. Gale ca0540d370 Check that individual proxy configurations are objects 2025-06-27 14:32:16 +01:00
Michael B. Gale e9938e34d5 Check that proxy configurations are an array 2025-06-27 14:32:15 +01:00