Add a debug log message when forcing the latest tools
This commit is contained in:
parent
416ad3d847
commit
f47f573e6e
3 changed files with 29 additions and 17 deletions
21
lib/codeql.js
generated
21
lib/codeql.js
generated
|
|
@ -226,17 +226,22 @@ async function getCodeQLBundleDownloadURL(apiDetails, variant, logger) {
|
|||
*/
|
||||
async function setupCodeQL(codeqlURL, apiDetails, tempDir, variant, featureFlags, logger, checkVersion) {
|
||||
try {
|
||||
const forceLatest =
|
||||
const forceLatestReason =
|
||||
// We use the special value of 'latest' to prioritize the version in the
|
||||
// defaults over any pinned cached version.
|
||||
codeqlURL === "latest" ||
|
||||
// If the user hasn't requested a particular CodeQL version, then bypass
|
||||
// the toolcache when the appropriate feature flag is enabled. This
|
||||
// allows us to quickly rollback a broken bundle that has made its way
|
||||
// into the toolcache.
|
||||
(codeqlURL === undefined &&
|
||||
(await featureFlags.getValue(feature_flags_1.FeatureFlag.BypassToolcacheEnabled)));
|
||||
codeqlURL === "latest"
|
||||
? '"tools: latest" was requested'
|
||||
: // If the user hasn't requested a particular CodeQL version, then bypass
|
||||
// the toolcache when the appropriate feature flag is enabled. This
|
||||
// allows us to quickly rollback a broken bundle that has made its way
|
||||
// into the toolcache.
|
||||
codeqlURL === undefined &&
|
||||
(await featureFlags.getValue(feature_flags_1.FeatureFlag.BypassToolcacheEnabled))
|
||||
? "a specific version of CodeQL was not requested, and the bypass toolcache feature flag is enabled"
|
||||
: undefined;
|
||||
const forceLatest = forceLatestReason !== undefined;
|
||||
if (forceLatest) {
|
||||
logger.debug(`Forcing the latest version of the CodeQL tools since ${forceLatestReason}.`);
|
||||
codeqlURL = undefined;
|
||||
}
|
||||
let codeqlFolder;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -431,17 +431,24 @@ export async function setupCodeQL(
|
|||
checkVersion: boolean
|
||||
): Promise<{ codeql: CodeQL; toolsVersion: string }> {
|
||||
try {
|
||||
const forceLatest =
|
||||
const forceLatestReason =
|
||||
// We use the special value of 'latest' to prioritize the version in the
|
||||
// defaults over any pinned cached version.
|
||||
codeqlURL === "latest" ||
|
||||
// If the user hasn't requested a particular CodeQL version, then bypass
|
||||
// the toolcache when the appropriate feature flag is enabled. This
|
||||
// allows us to quickly rollback a broken bundle that has made its way
|
||||
// into the toolcache.
|
||||
(codeqlURL === undefined &&
|
||||
(await featureFlags.getValue(FeatureFlag.BypassToolcacheEnabled)));
|
||||
codeqlURL === "latest"
|
||||
? '"tools: latest" was requested'
|
||||
: // If the user hasn't requested a particular CodeQL version, then bypass
|
||||
// the toolcache when the appropriate feature flag is enabled. This
|
||||
// allows us to quickly rollback a broken bundle that has made its way
|
||||
// into the toolcache.
|
||||
codeqlURL === undefined &&
|
||||
(await featureFlags.getValue(FeatureFlag.BypassToolcacheEnabled))
|
||||
? "a specific version of CodeQL was not requested, and the bypass toolcache feature flag is enabled"
|
||||
: undefined;
|
||||
const forceLatest = forceLatestReason !== undefined;
|
||||
if (forceLatest) {
|
||||
logger.debug(
|
||||
`Forcing the latest version of the CodeQL tools since ${forceLatestReason}.`
|
||||
);
|
||||
codeqlURL = undefined;
|
||||
}
|
||||
let codeqlFolder: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue