Skip to content

chore: Added debug for queued events function #4312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Octokit } from '@octokit/rest';

Check notice on line 1 in lambdas/functions/control-plane/src/scale-runners/scale-up.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 4.47 to 4.53, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
import { addPersistentContextToChildLogger, createChildLogger } from '@aws-github-runner/aws-powertools-util';
import { getParameter, putParameter } from '@aws-github-runner/aws-ssm-util';
import yn from 'yn';
Expand Down Expand Up @@ -148,6 +148,12 @@
});
metricGitHubAppRateLimit(jobForWorkflowRun.headers);
isQueued = jobForWorkflowRun.data.status === 'queued';
if (!isQueued) {
logger.info(`Job ${payload.id} is not queued`);
}
else {
logger.info(`Job ${payload.id} is queued`);
}
} else {
throw Error(`Event ${payload.eventType} is not supported`);
}
Expand Down
Loading