mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 05:30:16 +08:00
Remove TRAP caching feature flag
This commit is contained in:
@@ -37,7 +37,6 @@ export enum Feature {
|
||||
CliConfigFileEnabled = "cli_config_file_enabled",
|
||||
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
||||
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
|
||||
TrapCachingEnabled = "trap_caching_enabled",
|
||||
UploadFailedSarifEnabled = "upload_failed_sarif_enabled",
|
||||
}
|
||||
|
||||
@@ -57,10 +56,6 @@ export const featureConfig: Record<
|
||||
envVar: "CODEQL_ML_POWERED_QUERIES",
|
||||
minimumVersion: "2.7.5",
|
||||
},
|
||||
[Feature.TrapCachingEnabled]: {
|
||||
envVar: "CODEQL_TRAP_CACHING",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.UploadFailedSarifEnabled]: {
|
||||
envVar: "CODEQL_ACTION_UPLOAD_FAILED_SARIF",
|
||||
minimumVersion: "2.11.3",
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { getGitHubVersion } from "./api-client";
|
||||
import { CodeQL, CODEQL_VERSION_NEW_TRACING } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { Feature, FeatureEnablement, Features } from "./feature-flags";
|
||||
import { Feature, Features } from "./feature-flags";
|
||||
import {
|
||||
initCodeQL,
|
||||
initConfig,
|
||||
@@ -253,7 +253,7 @@ async function run() {
|
||||
getOptionalInput("registries"),
|
||||
getOptionalInput("config-file"),
|
||||
getOptionalInput("db-location"),
|
||||
await getTrapCachingEnabled(features),
|
||||
getTrapCachingEnabled(),
|
||||
// Debug mode is enabled if:
|
||||
// - The `init` Action is passed `debug: true`.
|
||||
// - Actions step debugging is enabled (e.g. by [enabling debug logging for a rerun](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow),
|
||||
@@ -385,9 +385,7 @@ async function run() {
|
||||
);
|
||||
}
|
||||
|
||||
async function getTrapCachingEnabled(
|
||||
featureEnablement: FeatureEnablement
|
||||
): Promise<boolean> {
|
||||
function getTrapCachingEnabled(): boolean {
|
||||
// If the workflow specified something always respect that
|
||||
const trapCaching = getOptionalInput("trap-caching");
|
||||
if (trapCaching !== undefined) return trapCaching === "true";
|
||||
@@ -395,8 +393,8 @@ async function getTrapCachingEnabled(
|
||||
// On self-hosted runners which may have slow network access, disable TRAP caching by default
|
||||
if (!isHostedRunner()) return false;
|
||||
|
||||
// On hosted runners, respect the feature flag
|
||||
return await featureEnablement.getValue(Feature.TrapCachingEnabled);
|
||||
// On hosted runners, enable TRAP caching by default
|
||||
return true;
|
||||
}
|
||||
|
||||
async function runWrapper() {
|
||||
|
||||
Reference in New Issue
Block a user