fix: return array pod build errors - #8072
Merged
Sovietaced merged 2 commits intoSep 24, 2026
Merged
Conversation
Check the pod-builder error before asserting the returned object type. Preserve that error when releasing the allocation token so cleanup cannot hide the failed launch. Signed-off-by: 1fanwang <1fannnw@gmail.com>
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8072 +/- ##
==========================================
+ Coverage 56.50% 57.32% +0.81%
==========================================
Files 772 931 +159
Lines 52285 58315 +6030
==========================================
+ Hits 29546 33429 +3883
- Misses 19974 21833 +1859
- Partials 2765 3053 +288
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:
|
Sovietaced
approved these changes
Sep 24, 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.
Tracking issue
None.
Why are the changes needed?
A legacy container_array task with an invalid pod specification panics instead of reporting the validation error.
The executor now returns the original task-specification error. Allocation cleanup no longer discards it or replaces it with a cleanup error.
What changes were proposed in this pull request?
Check the pod-builder error before asserting the returned object type, and preserve that error while releasing the allocation token. Regression coverage includes successful and failed cleanup.
How was this patch tested?
Testing Done
The file-backed replay in this PR starts the real array executor from empty state. It reads task and input protobufs from local storage, advances through the normal phases, and reaches the real pod builder with a missing primary-container configuration.
This is a plugin-level replay. Only surrounding execution metadata uses the existing test fixture; neither the executor nor the pod builder is mocked. It does not start Admin or Kubernetes, because the error occurs before a Kubernetes request.
To reproduce the before case from the PR checkout, copy only the replay test onto the base. The implementation stays unchanged:
The base reaches round 4 and produces:
Run the same case on this branch:
It returns the validation error instead:
Raw replay output
Selected base output, with stack frames omitted:
Selected branch output:
Labels
fixed
Setup process
Go 1.26.2. The replay uses a temporary directory and needs no Kubernetes configuration.
Screenshots
Not applicable.
Check all the applicable boxes
No documentation update is needed for this error-path fix. The test run covers the affected array packages and ordinary pod package.
Related PRs
None.
Stack
If you do use
git townto manage PR Stacks, the stack relevant to this PRwill show below. Otherwise, you can ignore this section.
Docs link
Not applicable.