Skip to content

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Nov 28, 2025

Two nits from the review, sent as follow-ups

Add admission-time validation for the RetryDelay field in
VirtualMCPServer composite tool error handling. This ensures
invalid duration formats are rejected with clear error messages
instead of silently failing during conversion.

Changes:
- Add RetryDelay format validation in validateStepErrorHandling()
- Reuse existing validateDuration() from the same package
- Add tests for valid durations (5s, 1m30s) and invalid formats
Log a warning when RetryDelay duration parsing fails in the converter.
This improves debugging by making it clear when an invalid duration
is silently defaulting to zero, even though webhook validation should
catch invalid formats at admission time.
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Nov 28, 2025
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.53%. Comparing base (fda9a56) to head (ea0923e).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...lpha1/virtualmcpcompositetooldefinition_webhook.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2795      +/-   ##
==========================================
+ Coverage   56.52%   56.53%   +0.01%     
==========================================
  Files         319      319              
  Lines       30886    30894       +8     
==========================================
+ Hits        17458    17466       +8     
  Misses      11924    11924              
  Partials     1504     1504              

☔ 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.

JAORMX
JAORMX previously approved these changes Nov 28, 2025
Define ErrorActionAbort, ErrorActionContinue, and ErrorActionRetry
constants to replace string literals in webhook validation code.
This addresses a goconst linter warning about repeated string usage
and improves code maintainability.
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Nov 28, 2025
@jhrozek jhrozek merged commit c73c5ef into main Nov 28, 2025
33 checks passed
@jhrozek jhrozek deleted the retrydelay_harden branch November 28, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants