Open
Conversation
…SG - remove scale-in protection and allow ASG to terminate them or move them to warm pool.
Contributor
|
This change breaks the use case of configuring a maximum number of builds. When an instance reaches the maximum number of builds, the desired capacity may not change, but the plugin will set the instance offline within Jenkins then execute the termination. If the plugin is changed to no longer issue terminations, then those instances would never be replaced and just sit idle not able to process any jobs. |
Author
|
Added logic - terminate if max uses exhausted, remove scale in protection otherwise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea behind this PR is to allow ASG to use warm pool, for faster builds - it's faster to get stopped instance from warm pool, than spin up it from image, and stopped instance will have caches/checked out code from last build.
Implementation details:
Instead of terminating instance - plugin removes scale-in protection from the instance it wants to terminate and allows ASG to handle instance termination - AGS will move this instance back to warm pool if there is one configured.
Related to #352
Testing done
Tested on live jenkins instance, and corrected automated tests.
Submitter checklist