Skip to content
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

[JENKINS-64571] Fall back to on demand provisioning when spot quota exceeded and option set #605

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

TheImplementer
Copy link
Contributor

Description of the issue available at: https://issues.jenkins.io/browse/JENKINS-64571

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

RequestSpotInstancesResult reqResult;
try {
// Make the request for a new Spot instance
reqResult = ec2.requestSpotInstances(spotRequest);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some logic below for something similar could the logic be merged instead of duplicated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is not really duplicated. In this case the client would just throw an exception, while in SlaveTemplate.java:1405 the logic is based on the status of spots requests that were created successfully. (hence the need to cancel them before falling back to on demand)

@res0nance res0nance added the enhancement Feature additions or enhancements label Apr 29, 2021
Copy link
Contributor

@res0nance res0nance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clearing things up

@res0nance res0nance merged commit df04df3 into jenkinsci:master Apr 29, 2021
@TheImplementer TheImplementer deleted the spot-fallback-on-demand branch April 29, 2021 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature additions or enhancements
Projects
None yet
2 participants