Repository navigation
VMCP: Delete rawConfig - #3155
Conversation
There was a problem hiding this comment.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3155 +/- ##
==========================================
- Coverage 57.22% 57.13% -0.10%
==========================================
Files 346 346
Lines 34452 34304 -148
==========================================
- Hits 19716 19598 -118
+ Misses 13099 13079 -20
+ Partials 1637 1627 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3f51062 to
dae6fc0
Compare
Signed-off-by: Jeremy Drouillard <[email protected]>
Signed-off-by: Jeremy Drouillard <[email protected]>
Signed-off-by: Jeremy Drouillard <[email protected]>
Signed-off-by: Jeremy Drouillard <[email protected]>
3716b45 to
e463056
Compare
jhrozek
left a comment
There was a problem hiding this comment.
Inconsistencies in snake_case vs camelCase are being addressed separately.
Summary
Deleted
rawConfigand unmarshal directly toconfig.Configwith strict mode.Step 1 of #3125
Changes to
pkg/vmcp/config/yaml_loader.go:Removed all
rawtypes :rawConfig,rawIncomingAuth,rawOutgoingAuth,rawBackendAuthStrategyrawHeaderInjectionAuth,rawTokenExchangeAuth,rawAggregationrawConflictResolutionConfig,rawWorkloadToolConfig,rawToolOverriderawCompositeTool,rawWorkflowStep,rawStepErrorHandlingrawElicitationResponse,rawOutputConfig,rawOutputPropertyRewrote
Load()to use strict unmarshalling:Replaced
transform*methods withprocess*post-processing:processOutgoingAuth()- resolves environment variablesprocessBackendAuthStrategy()- validates and resolves env vars for auth strategiesprocessCompositeTool()- validates JSON Schema parametersprocessWorkflowStep()- applies type inference and default timeoutsChanges to
pkg/vmcp/config/config.go:Added
yaml:tags to all struct fields that were missing them (to support yaml.v3 strict mode):CompositeToolConfigfieldsWorkflowStepConfigfieldsStepErrorHandlingfieldsElicitationResponseConfigfieldsAggregationConfig.ExcludeAllToolsWorkloadToolConfig.ExcludeAllTest updates:
Updated test files to work with the new direct unmarshalling approach:
yaml_loader_transform_test.go- testsprocess*methodscrd_cli_roundtrip_test.go- tests direct marshal/unmarshal roundtripsResult:
yaml_loader.go(~62% reduction)Large PR Justification
This is deleting over 1000 lines of code in order to simplify our config. This change cannot be made smaller.