test(jobs-manager): lock spawned-job RESOURCE_REQUESTS/LIMITS default at 8Gi#260
Merged
Conversation
… at 8Gi Add helm-unittest assertions pinning the rendered per-spawned-job RESOURCE_REQUESTS / RESOURCE_LIMITS env to "cpu=2,memory=8Gi" on both containers (api + pods-monitor), plus an operator-override case. The chart is the single effective source of truth for these values (it always injects them), so this guards against silent drift between the chart and client-runtime's jobs_manager.py fallback — the drift reconciled in tracebloc/backend#745. Refs tracebloc/backend#745 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 19 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
shujaatTracebloc
approved these changes
Jun 16, 2026
aptracebloc
approved these changes
Jun 16, 2026
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.
What
Adds helm-unittest assertions pinning the rendered per-spawned-training-job
RESOURCE_REQUESTS/RESOURCE_LIMITSenv tocpu=2,memory=8Gion both containers that receive it (api+pods-monitor), plus an operator-override case.Why
The chart is the single effective source of truth for these values —
jobs-manager-deployment.yamlalways injects them with a templated"cpu=2,memory=8Gi"fallback, andclient-runtime'sjobs_manager.pyonly falls back to its own default when they're absent. Those two had silently drifted (the chart said 8Gi; the code's dead-code default was ~202Mi request / 20G limit). This guard renders the template and asserts the value so the drift can't recur unnoticed — the "render-and-assert test" called for in tracebloc/backend#745.The two
containsblocks per container also guard against one of the template's two RESOURCE_* blocks being edited without the other.Test
Companion
The actual reconciliation (code fallback → 8Gi) lives in the runtime: tracebloc/client-runtime#111.
Refs tracebloc/backend#745
🤖 Generated with Claude Code
Note
Low Risk
Test-only change; no Helm template or runtime behavior is modified in this PR.
Overview
Adds helm-unittest coverage in
jobs_manager_test.yamlso the jobs-manager chart cannot silently drift from the intended per-spawned-training-job resource env vars.New cases render
jobs-manager-deployment.yamland assert thatRESOURCE_REQUESTSandRESOURCE_LIMITSdefault tocpu=2,memory=8Gion both the api (containers[0]) and pods-monitor (containers[1]) containers, each emitted once. A second test confirms operators can override those values viavalues.env.RESOURCE_REQUESTS/RESOURCE_LIMITS.This is a contract test for tracebloc/backend#745: the chart is the effective source of truth for what
client-runtimesees when spawning training Jobs (companion runtime change is elsewhere).Reviewed by Cursor Bugbot for commit 431fe9d. Bugbot is set up for automated code reviews on this repo. Configure here.