Config validate#725
Open
AleksandarSavchev wants to merge 11 commits into
Open
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…ad of InternalError Validation paths returned field.InternalError for user-supplied values that failed to parse or unmarshal, which rendered as "Internal error:" in CLI output. Convert these to field.Invalid and propagate field.ErrorList through ValidateRulesetConfig and ValidateProviderConfig so callers can append errors directly without wrapping.
The previous "id/version" string concatenation could collide on the "/"
separator (e.g. id="foo", version="v1/v2" vs. id="foo/v1", version="v2").
Use a struct{ID, Version} map key so dedup is unambiguous regardless of
the contents of either field.
ValidateConfig only walked Providers; OutputConfig.MinStatus was unchecked even though the run path errors on invalid values. Reject unknown statuses with field.NotSupported listing the accepted set, hoist knownProviderIDs out of the loop, and add tests covering output validation, provider id duplication, and unknown provider ids.
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.
How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
Adds a
diki config validatecommand that validated the structure and content of a diki configuration file. This is useful for catching configuration errors early (e.g. in CI) before attempting a fulldiki run.The command validates:
shootName,projectNamespacefor the garden provider)Usage:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: