Skip to content

Fix partialFailureMode validator to accept CRD enum values - #4865

Merged
jhrozek merged 1 commit into
mainfrom
fix-partial-failure-mode-validation
Apr 16, 2026
Merged

jhrozek merged 1 commit into
mainfrom
fix-partial-failure-mode-validation

Conversation

@jhrozek

@jhrozek jhrozek commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

The camelCase config migration (PR #3195) accidentally changed the accepted partialFailureMode enum value from best_effort to bestEffort in the vMCP config validator, but the CRD still correctly defines the enum as best_effort. This made it impossible to enable best-effort partial failure mode — the CRD blocks bestEffort at admission and the validator blocks best_effort at runtime, so the pod crashes with a validation error on any attempt to use this feature.

This fixes the validator to accept best_effort, matching the CRD enum definition.

Fixes #4856

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Test plan

  • Existing unit tests updated and passing (TestValidator_ValidateFailureHandling — all 13 cases pass)
  • Lint passes (task lint-fix — 0 issues)

Generated with Claude Code

The camelCase config migration (PR #3195) accidentally changed the
accepted enum value from "best_effort" to "bestEffort" in the validator,
but the CRD still defines the enum as "best_effort". This made it
impossible to enable best-effort partial failure mode — the CRD blocks
"bestEffort" at admission and the validator blocks "best_effort" at
runtime.

Fixes #4856

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Apr 15, 2026
@codecov

codecov Bot commented Apr 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.13%. Comparing base (60108a1) to head (7dddf4d).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4865      +/-   ##
==========================================
- Coverage   69.14%   69.13%   -0.01%     
==========================================
  Files         530      531       +1     
  Lines       55278    55172     -106     
==========================================
- Hits        38220    38142      -78     
+ Misses      14132    14104      -28     
  Partials     2926     2926              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhrozek
jhrozek merged commit 0e5e576 into main Apr 16, 2026
42 checks passed
@jhrozek
jhrozek deleted the fix-partial-failure-mode-validation branch April 16, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to set partialFailureMode to best_effort on VirtualMCPServer

2 participants