mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 14:20:19 +00:00
Wait 15 seconds before checking API
This commit is contained in:
Generated
+2
-1
@@ -132921,6 +132921,7 @@ async function testCancellationDetection() {
|
||||
);
|
||||
return;
|
||||
}
|
||||
await new Promise((resolve8) => setTimeout(resolve8, 15e3));
|
||||
const checkRunId = parseInt(checkRunIdInput, 10);
|
||||
logger.info(
|
||||
`[Cancellation Test] Querying jobs API for run ${runId}, attempt ${attemptNumber}, check_run_id ${checkRunId}`
|
||||
@@ -132971,8 +132972,8 @@ async function run2(startedAt) {
|
||||
let uploadFailedSarifResult;
|
||||
let dependencyCachingUsage;
|
||||
try {
|
||||
await testCancellationDetection();
|
||||
restoreInputs();
|
||||
await testCancellationDetection();
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
checkGitHubVersionInRange(gitHubVersion, logger);
|
||||
const repositoryNwo = getRepositoryNwo();
|
||||
|
||||
@@ -64,6 +64,9 @@ async function testCancellationDetection(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Wait 15 seconds to ensure that the API has caught up with the job status
|
||||
await new Promise((resolve) => setTimeout(resolve, 15000));
|
||||
|
||||
const checkRunId = parseInt(checkRunIdInput, 10);
|
||||
logger.info(
|
||||
`[Cancellation Test] Querying jobs API for run ${runId}, attempt ${attemptNumber}, check_run_id ${checkRunId}`,
|
||||
@@ -127,12 +130,12 @@ async function run(startedAt: Date) {
|
||||
| undefined;
|
||||
let dependencyCachingUsage: DependencyCachingUsageReport | undefined;
|
||||
try {
|
||||
// TEMPORARY: Test cancellation detection via API
|
||||
await testCancellationDetection();
|
||||
|
||||
// Restore inputs from `init` Action.
|
||||
restoreInputs();
|
||||
|
||||
// TEMPORARY: Test cancellation detection via API
|
||||
await testCancellationDetection();
|
||||
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
checkGitHubVersionInRange(gitHubVersion, logger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user