workloadmanager: propagate CodeInterpreter template metadata to warm pool pods - #474
CapThunder19 wants to merge 1 commit into
Conversation
…pool pods Signed-off-by: Anirudh <anirudhpatwal19@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @CapThunder19! It looks like this is your first PR to volcano-sh/agentcube 🎉 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #474 +/- ##
==========================================
+ Coverage 59.98% 60.28% +0.29%
==========================================
Files 36 35 -1
Lines 3589 3626 +37
==========================================
+ Hits 2153 2186 +33
- Misses 1216 1218 +2
- Partials 220 222 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What type of PR is this
/kind bug
What this PR does / why we need it
When
warmPoolSize > 0, a CodeInterpreter'stemplate.labelsandtemplate.annotationsnever reached the sandbox pods.convertToPodTemplatebuilt the SandboxTemplate's pod spec but left its metadata empty, so warm-pool pods were created without them. The direct (non-warm-pool) path already applies them, so turning on a warm pool silently changed what ended up on the podThis PR
ObjectMeta(labels and annotations) on the SandboxTemplate's pod template inconvertToPodTemplate. The maps are copied so the informer-cached CodeInterpreter is never modified, and empty maps are stored as nil to match what the API server returns.podTemplateEqualcompare metadata as well as the spec, so adding or changing labels on an existing CodeInterpreter updates its SandboxTemplate.agent-sandbox already copies template metadata onto warm-pool pods, so no change is needed on that side.
Which issue(s) this PR fixes
Fixes #471
Special notes for your reviewer
go test ./pkg/workloadmanager/passes. I couldn't runmake lintlocally (Windows), so I'm relying on CI for that.codeinterpreterin the warm-pool path andcode-interpreterin the direct path. Renaming it would change every existing SandboxTemplate and recreate everyone's warm-pool pods, so I think it's better done separately if we want itDoes this PR introduce a user-facing change?