-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add min-available runners to scale-config #5713
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
140d43b
to
23f523f
Compare
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.
Could you add a test that shows this new code being validated?
...aform-aws-github-runner/modules/runners/lambdas/runners/src/scale-runners/gh-runners.test.ts
Outdated
Show resolved
Hide resolved
const repo: Repo = (() => { | ||
if (Config.Instance.enableOrganizationRunners) { | ||
return { | ||
owner: ec2runner.org !== undefined ? (ec2runner.org as string) : getRepo(ec2runner.repo as string).owner, | ||
repo: Config.Instance.scaleConfigRepo, | ||
}; | ||
} | ||
return getRepo(ec2runner.repo as string); | ||
})(); |
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 does this have to be put inside a temporary lambda that's immediately invoked?
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'm a Typescript newbie so I'm not really sure myself, I used another function as a template that I copied from. I'll work on removing the temporary lambda function.
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.
So the isEphemeralRunner() function above this uses the same code which I copied from. I'm inclined to keep it the same since it works. Maybe we can update both functions as an improvement in a separate pull request if we want to unravel the lambda.
Okay I'll work on adding a test for the new function. |
23f523f
to
bf39765
Compare
This change allows the min-available runners to be configured more specifically by the runner type rather than as a single global setting. Issue: pytorch/ci-infra#275 Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
bf39765
to
0034eb8
Compare
This change allows the min-available runners to be configured more specifically by the runner type rather than as a single global setting.
Issue: pytorch/ci-infra#275