Call MinimumInstanceChecker when an agent is bound#1124
Merged
Conversation
(cherry picked from commit 8726e40)
3 tasks
nevingeorgesunny
approved these changes
Aug 1, 2025
Member
Author
|
https://github.com/jenkinsci/ec2-plugin/pull/1124/checks?check_run_id=47157908661 According to CloudBees PCT testing this test is known to be flaky. Tried it locally in this branch and it passed 5×, so I am guessing the failure is unrelated to my changes. |
res0nance
approved these changes
Aug 12, 2025
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.
Extracted from #1121.
I was testing a cloud config like this
The intention is to keep two instances booted, connected, and ready to use at all times, treating them as “one-shot” (destroy after use, so there is no chance of cross-build state contamination). However after running a build, which consumed one instance, it was not replenished with a fresh one, until a periodic task ran every ten minutes. This is not nearly fast enough to keep up with even a moderately frequent build schedule. With this patch, the moment an instance is assigned to a build, the process of launching a fresh instance is started, so that the pool remains sufficiently warm so long as you do not trigger too many builds for the pool size to keep up.
There may well be other situations in which instances need to be refreshed; this is just the one I found in this scenario.