-
Notifications
You must be signed in to change notification settings - Fork 690
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 Per-AMI Spare Instance parameter #413
Conversation
e3fb940
to
1fcdb8c
Compare
1fcdb8c
to
0d316c0
Compare
0d316c0
to
24579b6
Compare
24579b6
to
cc2a0d6
Compare
Hi @res0nance, thanks for your review, I've fixed the ci issues, mind having another look? |
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.
Looks good to me pinging other reviewers
FYI: @erikhakansson can't request a review from you so pinging you
LGTM! Great idea that I'll definitely use at work. @res0nance is that because I'm not a member of the organisation? |
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.
Code changes look alright. Could you add a test for this feature?
Will Do |
Currently there is a parameter for minimum number of instances, if you set this to n, there will always be at least n instances. This PR adds minimum spare instances, if you set this to n, there will always be n unsused instances waiting for new builds (unless the instance cap is reached). Related: conjurinc/ops#401
712d5ef
to
d57a278
Compare
Added basic test |
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. I think we have builder classes for some of the mega-constructors you're using in the test, though I could be remembering something else.
Please for the love of JCasC and the next person touching this, split the data bound constructor to only be MANDATORY fields and everything else should use data bound setters. https://issues.jenkins-ci.org/browse/JENKINS-57513 |
Currently there is a parameter for minimum number of instances for an AMI,
if you set it to n, there will always be at least n instances.
This PR adds minimum spare instances, if you set this to n, there will
always be n unsused instances waiting for new builds (unless the
instance cap is reached). This prevents new builds from having to wait
for provisioning, while also meaning that you don't need to set a high
absolute minimum.
Related: conjurinc/ops#401