-
Notifications
You must be signed in to change notification settings - Fork 108
Rewrite scaleDown to fix a series of bugs #864
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
Conversation
…topped, and bad ordering of finishing runners
…nschmidt/fix_scaleDown_runnerSort
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
seemethere
left a comment
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.
LGTM, want to get a second review from @izaitsevfb
...aform-aws-github-runner/modules/runners/lambdas/runners/src/scale-runners/scale-down.test.ts
Outdated
Show resolved
Hide resolved
...aform-aws-github-runner/modules/runners/lambdas/runners/src/scale-runners/scale-down.test.ts
Outdated
Show resolved
Hide resolved
| { | ||
| runnerType: 'ignore-no-org-no-repo', | ||
| instanceId: '001', | ||
| launchTime: dateRef |
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.
nit:
dateRef
.clone()
.subtract(minimumRunningTimeInMinutes + x, 'minutes')
.toDate()
can be extracted as a reusable local function.
| expect(mockedTerminateRunner).toBeCalledTimes(6); | ||
| { | ||
| /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ | ||
| const { awsR, ghR } = getRunnerPair('keep-lt-min-no-ghrunner-no-ghr-02'); |
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.
Why not do const { awsR } = getRunnerPair(...) to avoid lint warning?
izaitsevfb
left a comment
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.
I've added a bunch of comments, they are basically nits, mostly FYI, something to consider in the future. Overall everything looks pretty good, the code is clean and easy to understand.
…nschmidt/fix_scaleDown_runnerSort
…culate the amount of instances to keep free
On scaleDown:
minAvailableRunnersrunners;