Fix: keep EKS nodes up after end_date while submissions are pending - #5187
Draft
cursor[bot] wants to merge 1 commit into
Draft
Fix: keep EKS nodes up after end_date while submissions are pending#5187cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…ding The EKS node autoscale Lambda treated end_date as an unconditional zero-nodes signal via _should_force_scale_down, so event-driven and sweep invocations killed code-upload capacity even with queued/running submissions still draining. Only is_disabled now forces scale-to-zero; ended challenges keep (or scale up) nodes until pending_submissions is 0. Co-authored-by: Rishabh Jain <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5187 +/- ##
=======================================
Coverage 91.30% 91.30%
=======================================
Files 115 115
Lines 8996 8996
=======================================
Hits 8214 8214
Misses 782 782
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
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.
Summary
scripts/lambda/auto_scale_eks_nodes_lambda.pytreated a pastend_dateas an unconditional scale-to-zero signal via_should_force_scale_down, even whenpending_submissions > 0. That undoes the pending-aware drain policy from #5179/#5185 for code-upload challenges: event-driven and sweep invocations zeroed the nodegroup, killing in-flight pods and leaving queued work without capacity.This is the same failure mode as #5185 (monitoring cron scripts), but in the production EKS Lambda path that #5185 does not cover.
Trigger scenario
end_datewith submissions stillqueued/running/resuming.auto_scale_eks_nodes_lambda._should_force_scale_downreturned True becauseend_date <= now.desiredSize=0regardless of pending count.Changes
_should_force_scale_downnow returns True only foris_disabledchallenges.pending_submissions == 0, then the normal idle path zeros the nodegroup.Test plan
python3 -m unittest tests.unit.lambda.test_auto_scale_eks_nodes_lambda -v— 24 passedblack --check --line-length=79/isort --check --profile=black --line-length=79on changed files