Skip to content

enable strict JSON spec unmarshalling#2202

Open
AndrewChubatiuk wants to merge 1 commit into
masterfrom
strict-spec-unmarshal
Open

enable strict JSON spec unmarshalling#2202
AndrewChubatiuk wants to merge 1 commit into
masterfrom
strict-spec-unmarshal

Conversation

@AndrewChubatiuk
Copy link
Copy Markdown
Contributor

@AndrewChubatiuk AndrewChubatiuk commented May 21, 2026

related issue VictoriaMetrics/helm-charts#2882


Summary by cubic

Enable strict JSON unmarshalling for all Operator CR specs to reject unknown fields and return clear errors. This prevents typos or unsupported keys from being silently accepted.

  • Bug Fixes

    • Added UnmarshalSpecStrict (uses DisallowUnknownFields) and wired all CR UnmarshalJSON paths (v1, v1alpha1, v1beta1) through it, setting ParsingSpecError on failure.
    • Updated VMAlertmanagerConfig tests/fixtures to use valid fields (e.g., msteams_configs, custom_fields placement).
    • Added a changelog entry documenting the behavior change.
  • Migration

    • Manifests with unknown or misspelled spec fields will now be rejected by the webhook; fix or remove extra keys before applying.

Written for commit a984354. Summary will update on new commits. Review in cubic

@AndrewChubatiuk AndrewChubatiuk requested a review from vrutkovs as a code owner May 21, 2026 06:58
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 25 files

Re-trigger cubic

@AndrewChubatiuk AndrewChubatiuk force-pushed the strict-spec-unmarshal branch from f79c746 to a984354 Compare May 21, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants