-
Notifications
You must be signed in to change notification settings - Fork 696
fix: job retry mechanism not triggering #4961
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ import { createGithubAppAuth, createGithubInstallationAuth, createOctokitClient | |
| import { createRunner, listEC2Runners, tag } from './../aws/runners'; | ||
| import { RunnerInputParameters } from './../aws/runners.d'; | ||
| import { metricGitHubAppRateLimit } from '../github/rate-limit'; | ||
| import { publishRetryMessage } from './job-retry'; | ||
|
|
||
| const logger = createChildLogger('scale-up'); | ||
|
|
||
|
|
@@ -356,6 +357,7 @@ export async function scaleUp(payloads: ActionRequestMessageSQS[]): Promise<stri | |
| } | ||
|
|
||
| scaleUp++; | ||
| await publishRetryMessage(message); | ||
| } | ||
|
|
||
| if (scaleUp === 0) { | ||
|
|
@@ -395,7 +397,7 @@ export async function scaleUp(payloads: ActionRequestMessageSQS[]): Promise<stri | |
| } | ||
|
|
||
| // No runners will be created, so skip calling the EC2 API. | ||
| if (missingInstanceCount === scaleUp) { | ||
| if (newRunners <= 0) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you say this is a separate fix? I think it'd be easier to get in via its own dedicated PR (with tests) if that's possible 👍
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really see the benefit in my opinion, this is a "Boy Scout" rule. But happy if that is what is needed to get things moving! |
||
| continue; | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test sets
RUNNERS_MAXIMUM_COUNT = '0'but doesn't verify thatlistEC2Runnersis called. According to the scale-up logic (lines 370-371 in scale-up.ts), whenmaximumRunnersis not -1,listEC2Runnersshould be called to get the current runner count. The test should verify this behavior is occurring as expected.