Repository navigation
fix: remove duplicate chart value and strictly validate source YAML - #534
Merged
hossain-rayhan merged 1 commit intoDec 3, 2026
Conversation
Remove the repeated sidecarInjector.namespace key. Strictly decode both charts source values in the existing Go unit suite so duplicates fail before Helm rendering, even without Helm installed. Reproduced the exact duplicate-key failure before the fix; product race/vet and all 132 Helm tests pass afterward. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058 Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
hossain-rayhan
requested review from
WentingWu666666,
alaye-ms and
xgerman
as code owners
December 3, 2026 16:54
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were reported for the duplicate YAML key cleanup and added regression coverage.
No open issues 🎉
What changed in this PR
Removes a duplicate Helm chart value and adds regression coverage to catch duplicate YAML keys before rendering.
Changes:
- Removes the repeated
sidecarInjector.namespacekey without changing its value. - Adds strict YAML validation for both charts’ source values files, without requiring Helm.
| File | Description |
|---|---|
operator/src/internal/product/chart_values_test.go |
Adds strict YAML validation for both charts. |
operator/product-helm-chart/values.yaml |
Removes the duplicate namespace key. |
Review effort: Balanced
xgerman
approved these changes
Dec 3, 2026
alaye-ms
approved these changes
Dec 3, 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.
Fix
Remove the duplicated sidecarInjector.namespace key from the experimental product chart values.
Why validation missed it
Helm rendering and permissive YAML decoding collapsed the duplicate key (both values were identical). Existing chart assertions validated rendered resources, not uniqueness in the source values file.
Regression test
Add TestChartValuesAreStrictYAML to the existing Go unit suite. It strictly decodes both charts source values.yaml files using the existing YAML dependency, without requiring Helm. Existing CI already runs this test on changes to either chart or Go sources.
Verified red before the fix: the test fails at values.yaml line 15 with key namespace already set in map. After removing the duplicate, the product race suite, vet, and all 132 Helm tests pass. No dependencies, rendered values or existing DocumentDB defaults change.