fix(api): replace runner list overrides - #951
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4be731229b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Quick review follow-up for the library maintainers: the sole automated review thread was fixed in |
|
defaultSpec.Containers[0].Args = configv1alpha1.ChooseSlice(defaultSpec.Containers[0].Args, overrideSpec.Args)
defaultSpec.Containers[0].Command = configv1alpha1.ChooseSlice(defaultSpec.Containers[0].Command, overrideSpec.Command)With the new semantics, if a user sets Before this PR, that same explicit empty override was a no-op (it fell back to the defaults) — this is a regression caused by sharing
Suggested fix: keep the public // used only for repository/layer OverrideRunnerSpec precedence,
// where an explicit empty slice must clear the repository's value.
func overrideSlice(a, b []string) []string {
if b != nil {
return b
}
return a
}and use it in |
Summary
OverrideRunnerSpeclist fields use layer-level replacement instead of merging repository and layer valuesCloses #420
Validation
go test ./api/v1alpha1go vet ./...make test(Kubernetes envtest 1.36.0 plus Azurite, MinIO, LocalStack, and fake GCS Docker services; cleanup completed)git diff --checkAI assistance disclosure
I used OpenAI Codex to help analyze the issue, implement the change, and update the regression tests. I reviewed the resulting diff and ran the validation commands listed above.