From 5d931ea2a2b2f4d64e1f8f3d595ed68bd2d49eb5 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 23 Jan 2023 20:00:44 +0000 Subject: [PATCH] Fall back to the default.json CLI version if feature flags misconfigured --- lib/feature-flags.js | 17 +++++++++++++---- lib/feature-flags.js.map | 2 +- lib/feature-flags.test.js | 4 ++-- lib/feature-flags.test.js.map | 2 +- src/feature-flags.test.ts | 4 ++-- src/feature-flags.ts | 19 ++++++++++++++----- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/lib/feature-flags.js b/lib/feature-flags.js index c40fe97545..b426def1b6 100644 --- a/lib/feature-flags.js +++ b/lib/feature-flags.js @@ -32,7 +32,6 @@ const defaults = __importStar(require("./defaults.json")); const util = __importStar(require("./util")); const DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_"; const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled"; -const MINIMUM_ENABLED_CODEQL_VERSION = "2.11.6"; var Feature; (function (Feature) { Feature["BypassToolcacheEnabled"] = "bypass_toolcache_enabled"; @@ -173,9 +172,19 @@ class GitHubFeatureFlags { .filter((f) => f !== undefined) .map((f) => f); if (enabledFeatureFlagCliVersions.length === 0) { - this.logger.debug("Feature flags do not specify a default CLI version. Falling back to CLI version " + - `${MINIMUM_ENABLED_CODEQL_VERSION}.`); - return MINIMUM_ENABLED_CODEQL_VERSION; + // We expect at least one default CLI version to be enabled on Dotcom at any time. However if + // the feature flags are misconfigured, rather than crashing, we fall back to the CLI version + // shipped with the Action in defaults.json. This has the effect of immediately rolling out + // new CLI versions to all users running the latest Action. + // + // A drawback of this approach relates to the small number of users that run old versions of + // the Action on Dotcom. As a result of this approach, if we misconfigure the feature flags + // then these users will experience some alert churn. This is because the CLI version in the + // defaults.json shipped with an old version of the Action is likely older than the CLI + // version that would have been specified by the feature flags before they were misconfigured. + this.logger.warning("Feature flags do not specify a default CLI version. Falling back to the CLI version " + + `shipped with the Action. This is ${defaults.cliVersion}.`); + return defaults.cliVersion; } const maxCliVersion = enabledFeatureFlagCliVersions.reduce((maxVersion, currentVersion) => currentVersion > maxVersion ? currentVersion : maxVersion, enabledFeatureFlagCliVersions[0]); this.logger.debug(`Derived default CLI version of ${maxCliVersion} from feature flags.`); diff --git a/lib/feature-flags.js.map b/lib/feature-flags.js.map index 73e128d2c9..339fdee0f6 100644 --- a/lib/feature-flags.js.map +++ b/lib/feature-flags.js.map @@ -1 +1 @@ -{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AACvD,MAAM,8BAA8B,GAAG,QAAQ,CAAC;AAqBhD,IAAY,OAQX;AARD,WAAY,OAAO;IACjB,8DAAmD,CAAA;IACnD,sFAA2E,CAAA;IAC3E,2DAAgD,CAAA;IAChD,2EAAgE,CAAA;IAChE,iEAAsD,CAAA;IACtD,sDAA2C,CAAA;IAC3C,mEAAwD,CAAA;AAC1D,CAAC,EARW,OAAO,GAAP,eAAO,KAAP,eAAO,QAQlB;AAEY,QAAA,aAAa,GAGtB;IACF,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;QAChC,MAAM,EAAE,yBAAyB;QACjC,+EAA+E;QAC/E,iCAAiC;QACjC,cAAc,EAAE,SAAS;KAC1B;IACD,CAAC,OAAO,CAAC,iCAAiC,CAAC,EAAE;QAC3C,MAAM,EAAE,sCAAsC;QAC9C,+EAA+E;QAC/E,iCAAiC;QACjC,cAAc,EAAE,SAAS;KAC1B;IACD,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAAE;QACtC,MAAM,EAAE,gCAAgC;QACxC,cAAc,EAAE,SAAS;KAC1B;IACD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CAAC,OAAO,CAC3C,8DAA8D,EAC9D;gBACE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAC9B,CACF,CAAC;YACF,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC;YAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,wFAAwF;gBACtF,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CACnC,CAAC;YACF,OAAO,WAAW,CAAC;SACpB;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,gGAAgG;oBAC9F,oEAAoE;oBACpE,qFAAqF;oBACrF,kFAAkF,CAAC,EAAE,CACxF,CAAC;gBACF,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,kFAAkF;gBAClF,8EAA8E;gBAC9E,2FAA2F;gBAC3F,eAAe;gBACf,MAAM,IAAI,KAAK,CACb,sEAAsE,CAAC,EAAE,CAC1E,CAAC;aACH;SACF;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAqBvD,IAAY,OAQX;AARD,WAAY,OAAO;IACjB,8DAAmD,CAAA;IACnD,sFAA2E,CAAA;IAC3E,2DAAgD,CAAA;IAChD,2EAAgE,CAAA;IAChE,iEAAsD,CAAA;IACtD,sDAA2C,CA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AAC;gBACF,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,kFAAkF;gBAClF,8EAA8E;gBAC9E,2FAA2F;gBAC3F,eAAe;gBACf,MAAM,IAAI,KAAK,CACb,sEAAsE,CAAC,EAAE,CAC1E,CAAC;aACH;SACF;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"} \ No newline at end of file diff --git a/lib/feature-flags.test.js b/lib/feature-flags.test.js index e0a691b312..7e893c4e24 100644 --- a/lib/feature-flags.test.js +++ b/lib/feature-flags.test.js @@ -242,13 +242,13 @@ for (const variant of [util_1.GitHubVariant.GHAE, util_1.GitHubVariant.GHES]) { }); }); }); -(0, ava_1.default)(`selects CLI v2.11.6 on Dotcom when no default version feature flags are enabled`, async (t) => { +(0, ava_1.default)(`selects CLI from defaults.json on Dotcom when no default version feature flags are enabled`, async (t) => { await (0, util_1.withTmpDir)(async (tmpDir) => { const featureEnablement = setUpFeatureFlagTests(tmpDir); const expectedFeatureEnablement = initializeFeatures(true); (0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, expectedFeatureEnablement); t.deepEqual(await featureEnablement.getDefaultCliVersion(util_1.GitHubVariant.DOTCOM), { - cliVersion: "2.11.6", + cliVersion: defaults.cliVersion, variant: util_1.GitHubVariant.DOTCOM, }); }); diff --git a/lib/feature-flags.test.js.map b/lib/feature-flags.test.js.map index ebdab5f1e5..4bfed42c74 100644 --- a/lib/feature-flags.test.js.map +++ b/lib/feature-flags.test.js.map @@ -1 +1 @@ -{"version":3,"file":"feature-flags.test.js","sourceRoot":"","sources":["../src/feature-flags.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,8CAA6C;AAE7C,0DAA4C;AAC5C,mDAMyB;AACzB,uCAA4C;AAC5C,6CAAkD;AAClD,mDAOyB;AAEzB,iCAA0E;AAE1E,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,aAAI,CAAC,UAAU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CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACzD,QAAQ,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC;QAC7B,OAAO,QAAQ,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAc,EACd,MAAM,GAAG,IAAA,yBAAe,EAAC,IAAI,CAAC,EAC9B,gBAAgB,EAAE,IAAI,EAAE,oBAAa,CAAC,MAAM,EAAwB;IAEpE,IAAA,gCAAgB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,OAAO,IAAI,wBAAQ,CAAC,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,uBAAuB,CAAC,OAAe;IAC9C,OAAO,6BAAa,CAAC,OAAO,CAAC,CAAC,cAAc,KAAK,SAAS;QACxD,CAAC,CAAC,IAAA,iCAAiB,EAAC,OAAO,CAAC;QAC5B,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/src/feature-flags.test.ts b/src/feature-flags.test.ts index 8843e49756..7457977626 100644 --- a/src/feature-flags.test.ts +++ b/src/feature-flags.test.ts @@ -407,7 +407,7 @@ test("selects CLI v2.12.1 on Dotcom when feature flags enable v2.12.0 and v2.12. }); }); -test(`selects CLI v2.11.6 on Dotcom when no default version feature flags are enabled`, async (t) => { +test(`selects CLI from defaults.json on Dotcom when no default version feature flags are enabled`, async (t) => { await withTmpDir(async (tmpDir) => { const featureEnablement = setUpFeatureFlagTests(tmpDir); const expectedFeatureEnablement = initializeFeatures(true); @@ -416,7 +416,7 @@ test(`selects CLI v2.11.6 on Dotcom when no default version feature flags are en t.deepEqual( await featureEnablement.getDefaultCliVersion(GitHubVariant.DOTCOM), { - cliVersion: "2.11.6", + cliVersion: defaults.cliVersion, variant: GitHubVariant.DOTCOM, } ); diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 110c331fed..4c4ebb5a75 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -12,7 +12,6 @@ import * as util from "./util"; const DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_"; const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled"; -const MINIMUM_ENABLED_CODEQL_VERSION = "2.11.6"; export type CodeQLDefaultVersionInfo = | { @@ -231,11 +230,21 @@ class GitHubFeatureFlags implements FeatureEnablement { .map((f) => f as string); if (enabledFeatureFlagCliVersions.length === 0) { - this.logger.debug( - "Feature flags do not specify a default CLI version. Falling back to CLI version " + - `${MINIMUM_ENABLED_CODEQL_VERSION}.` + // We expect at least one default CLI version to be enabled on Dotcom at any time. However if + // the feature flags are misconfigured, rather than crashing, we fall back to the CLI version + // shipped with the Action in defaults.json. This has the effect of immediately rolling out + // new CLI versions to all users running the latest Action. + // + // A drawback of this approach relates to the small number of users that run old versions of + // the Action on Dotcom. As a result of this approach, if we misconfigure the feature flags + // then these users will experience some alert churn. This is because the CLI version in the + // defaults.json shipped with an old version of the Action is likely older than the CLI + // version that would have been specified by the feature flags before they were misconfigured. + this.logger.warning( + "Feature flags do not specify a default CLI version. Falling back to the CLI version " + + `shipped with the Action. This is ${defaults.cliVersion}.` ); - return MINIMUM_ENABLED_CODEQL_VERSION; + return defaults.cliVersion; } const maxCliVersion = enabledFeatureFlagCliVersions.reduce(