-
Notifications
You must be signed in to change notification settings - Fork 66
✨ OPRUN-4112: Add config support with jsonschema validation [WIP] #2177
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
base: main
Are you sure you want to change the base?
✨ OPRUN-4112: Add config support with jsonschema validation [WIP] #2177
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2177 +/- ##
==========================================
+ Coverage 72.73% 72.90% +0.17%
==========================================
Files 79 80 +1
Lines 7391 7541 +150
==========================================
+ Hits 5376 5498 +122
- Misses 1667 1685 +18
- Partials 348 358 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1d44a8f
to
86f8c3a
Compare
86f8c3a
to
3a81ef9
Compare
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Per Goncalves da Silva <[email protected]>
3a81ef9
to
16bb72e
Compare
// WatchNamespace is supported for certain bundles to allow the user to configure installation in Single- or OwnNamespace modes | ||
// The validation behavior of this field is determined by the install modes supported by the bundle, e.g.: | ||
// - If a bundle only supports AllNamespaces mode (or only OwnNamespace mode): this field will be unknown | ||
// - If a bundle supports AllNamespaces and SingleNamespace install modes: this field is optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// - If a bundle supports AllNamespaces and SingleNamespace install modes: this field is optional | |
// - If a bundle supports AllNamespaces and SingleNamespace install modes: this field is optional and must NOT be equal to the install namespace. | |
// - If a bundle supports AllNamespaces, OwnNamespace, and SingleNamespace install modes: this field is optional. |
ownSupported := supportedInstallModes.Has(v1alpha1.InstallModeTypeOwnNamespace) | ||
|
||
if len(supportedInstallModes) == 0 { | ||
panic("bundle does not support any supported install modes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Panic-ing here seems drastic, unless there's some other precondition check that would guarantee that the bundle has at least one supported install mode.
If we do have a precondition check, maybe beef up the panic message with something like:
panic("bundle does not support any supported install modes") | |
panic("programmer error: bundle validation should have guaranteed support for at least one install mode, but found no supported install modes") |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
Reviewer Checklist