Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling multiple controller-side validations #167

Closed
perdasilva opened this issue Apr 14, 2023 · 0 comments
Closed

Handling multiple controller-side validations #167

perdasilva opened this issue Apr 14, 2023 · 0 comments
Labels
kind/design Categorizes issue or PR as related to design. olm-v1/m3 priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@perdasilva
Copy link
Contributor

#142 introduces a validation step in the reconciler to ensure that any bad semvers that slip through the regex validation on the .spec.version field are still caught before before the resolver is executed. Without this, a resolution error would be thrown saying the regex cannot be parsed. So, it could be that this isn't necessary (although there is some argument to be made about ensuring the input is clean before it reaches the resolver).

The current validation code bails at the first validation failure, stops reconciliation (and doesn't re-enqueue the resource), and adds an InvalidSpec condition to the status. When/if we add additional field validators, we'll need to figure out how we want to present this to the user (and whether we want to run the whole validation suite first and collect all the errors, or still bail at the first one). This leads to a discussion of whether we ought to add multiple conditions of the same type (which doesn't seem like best practice), or put everything into one single condition.

@perdasilva perdasilva added kind/design Categorizes issue or PR as related to design. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. olm-v1/m3 labels Apr 14, 2023
@perdasilva perdasilva closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design. olm-v1/m3 priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

1 participant