Rename feature flag to CODEQL_ACTION_ARTIFACT_V2_UPGRADE

This commit is contained in:
Angela P Wen
2024-09-26 13:21:27 -07:00
parent 8e4d3c2dba
commit bca51cd79e
13 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ test("sanitizeArtifactName", (t) => {
test("uploadDebugArtifacts", async (t) => {
// Test that no error is thrown if artifacts list is empty.
const mockFeature = createFeatures([Feature.ArtifactUpgrade]);
const mockFeature = createFeatures([Feature.ArtifactV2Upgrade]);
await t.notThrowsAsync(
debugArtifacts.uploadDebugArtifacts(
[],
+1 -1
View File
@@ -264,7 +264,7 @@ export async function uploadDebugArtifacts(
// until it is supported. We also use the legacy version of the client if the feature flag is disabled.
const artifactUploader =
ghVariant !== GitHubVariant.GHES &&
(await features.getValue(Feature.ArtifactUpgrade))
(await features.getValue(Feature.ArtifactV2Upgrade))
? new artifact.DefaultArtifactClient()
: artifactLegacy.create();
+3 -3
View File
@@ -40,7 +40,7 @@ export interface FeatureEnablement {
* Legacy features should end with `_enabled`.
*/
export enum Feature {
ArtifactUpgrade = "artifact_upgrade",
ArtifactV2Upgrade = "artifact_v2_upgrade",
CleanupTrapCaches = "cleanup_trap_caches",
CppDependencyInstallation = "cpp_dependency_installation_enabled",
DisableCsharpBuildless = "disable_csharp_buildless",
@@ -81,9 +81,9 @@ export const featureConfig: Record<
toolsFeature?: ToolsFeature;
}
> = {
[Feature.ArtifactUpgrade]: {
[Feature.ArtifactV2Upgrade]: {
defaultValue: false,
envVar: "CODEQL_ACTION_ARTIFACT_UPGRADE",
envVar: "CODEQL_ACTION_ARTIFACT_V2_UPGRADE",
minimumVersion: undefined,
},
[Feature.CleanupTrapCaches]: {
+1 -1
View File
@@ -66,7 +66,7 @@ async function runWrapper() {
// until it is supported. We also use the legacy version of the client if the feature flag is disabled.
const artifactUploader =
config?.gitHubVersion.type !== GitHubVariant.GHES &&
(await features.getValue(Feature.ArtifactUpgrade))
(await features.getValue(Feature.ArtifactV2Upgrade))
? new artifact.DefaultArtifactClient()
: artifactLegacy.create();