test: Refactor distributed job creation in testing pt 2#1483
Open
itsomri wants to merge 4 commits into
Open
Conversation
Signed-off-by: itsomri <[email protected]>
Signed-off-by: itsomri <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- api/events NotReady test: collapse manual PG + pod into one helper call (MinMember=2, Parallelism defaults to 1). - allocate/elastic Balance test: replace 6 raw pods + 2 manual PGs with two CreateDistributedBatchJob calls sharing an elasticOpts struct; delete the now-unused createElasticPod helper. Signed-off-by: itsomri <[email protected]> Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…tion The Job-owned pods produced by CreateDistributedBatchJob were being recreated by the Job controller after the scheduler reclaimed/preempted them. Tests waiting for pod count to drop (partial reclaim/preemption) saw the count snap back to Parallelism and timed out. Add an optional BackoffLimit field on DistributedBatchJobOptions. nil preserves the k8s default (6 retries) so existing callers — including single-pod scale fillers that may legitimately want pod replacement — keep their old behavior. Reclaim/preempt elastic specs opt in with BackoffLimit=ptr.To(int32(0)): the first scheduler-induced deletion marks the Job Failed, the controller stops creating replacements, and surviving pods keep running, matching the raw-pod semantics those tests were written against. Opt-ins applied to the elastic preemptee/reclaimee jobs in reclaim_elastic_specs, reclaim_elastic_test, and preempt_elastic_specs; the gang reclaimer/preemptor side keeps the default. Signed-off-by: itsomri <[email protected]> Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
6cdbd3b to
a93ab6f
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.
Description
Related Issues
Fixes #
Checklist
Breaking Changes
Additional Notes