fix: scope consolidation validation to candidate-relevant state#3
Open
jamesmt-aws wants to merge 1 commit intomainfrom
Open
fix: scope consolidation validation to candidate-relevant state#3jamesmt-aws wants to merge 1 commit intomainfrom
jamesmt-aws wants to merge 1 commit intomainfrom
Conversation
9d8b3de to
3f878f4
Compare
Owner
Author
|
Note: |
15323b2 to
9a882c5
Compare
Consolidation validation currently operates on global cluster state, so any change to any NodePool can invalidate a plan that only affects one NodePool. This permanently blocks consolidation on clusters with mixed workloads where one NodePool has high pod turnover. Three scoping changes, one per validation stage: 1. revalidateTargetCandidates (stages 1 & 3): replace the global GetCandidates() + mapCandidates() rebuild with a targeted re-check of only the command's candidate nodes. 2. candidatePodSchedulingErrors (stage 2): replace AllNonPendingPodsScheduled() with a check that only examines the candidate's own pods for scheduling errors. 3. filterNewNodeClaimsByCandidatePods (stage 2): filter the NewNodeClaim comparison to only count claims containing pods displaced by the consolidation candidates. Includes design doc, integration tests (T1-T7), and unit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9a882c5 to
cab9291
Compare
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
Three scoping changes to consolidation validation, one per validation stage:
revalidateTargetCandidates(stages 1 & 3): re-check only the command's candidate nodes instead of rebuilding the global candidate listcandidatePodSchedulingErrors(stage 2): check only the candidate's pods for scheduling errors instead of all non-pending podsfilterNewNodeClaimsByCandidatePods(stage 2): count only NewNodeClaims containing candidate-displaced podsThe simulation itself is unchanged. Only the comparison logic is scoped. All three safety invariants are preserved.
Related
Test plan
🤖 Generated with Claude Code