-
Notifications
You must be signed in to change notification settings - Fork 32
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
⚠️ API updates based on external review #443
⚠️ API updates based on external review #443
Conversation
// +kubebuilder:validation:XValidation:rule="isURL(self.base)",message="base must be a valid URL" | ||
// +kubebuilder:validation:XValidation:rule="url(self.base).getScheme() == \"http\" || url(self.base).getScheme == \"https\"",message="scheme must be one of [http, https]" |
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.
Can these go on the Base string
definition instead of the struct?
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.
Depending on where these validations end up, also be cognizant of the message. For example:
- If the validation is on the
ClusterCatalogURLs
struct, then the message needs to reference the fieldbase
by name. - If the validation is on the
Base string
field, then the apiserver will construct a prefix on our message that includes thebase
field name. Therefore we don't need to repeatbase
in the message.
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.
I believe they have to go on the struct for CEL validations.
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.
I will update all the CEL messages to have a reference to the field.
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.
Turns out that you can do this and I totally overlooked that it could. I'm happy to move all CEL validations to the individual fields , where it makes sense, if that is preferred.
// | ||
// When omitted, the image will not be polled for new content. | ||
// +kubebuilder:validation:Format:=duration | ||
// +kubebuilder:validation:Minimum:=1 |
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.
Would we want to start off with a higher minimum? 1 minute feels very frequent.
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.
The higher we go, the longer our operator-controller e2e test for "do we automatically upgrade when a catalog poll finds new content?" will take.
If we can come up with a way to make that test execute faster, I could see increasing this minimum.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #443 +/- ##
==========================================
+ Coverage 37.83% 38.23% +0.40%
==========================================
Files 15 15
Lines 1208 1224 +16
==========================================
+ Hits 457 468 +11
- Misses 701 706 +5
Partials 50 50 ☔ View full report in Codecov by Sentry. |
// These on-cluster components may do a variety of things with this information, such as | ||
// presenting the content in a GUI dashboard or installing content from the catalog on the cluster. | ||
// The catalog source must contain catalog metadata in the File-Based Catalog (FBC) format. | ||
// For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs. |
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.
I hope that we have a way to know when these URL links break.
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.
We don't. I'm not sure it is the end of the world if they do break, but we control that docs site.
Note: go-apidiff and upgrade-e2e are expected to fail as we've made breaking changes to the API |
// base is a cluster-internal URL that provides endpoints for | ||
// accessing the content of the catalog. | ||
// | ||
// It is expected that client append the path for the endpoint they wish |
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.
// It is expected that client append the path for the endpoint they wish | |
// It is expected that clients append the path for the endpoint they wish |
// It is expected that client append the path for the endpoint they wish | ||
// to access. | ||
// | ||
// Currently, only a single version of the is served and is accessible at the path |
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.
// Currently, only a single version of the is served and is accessible at the path | |
// Currently, only a single API is served and is accessible at the path |
// Currently, only a single version of the is served and is accessible at the path | ||
// /api/v1. | ||
// | ||
// The endpoints served for v1 of the are: |
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.
// The endpoints served for v1 of the are: | |
// The endpoints served for the v1 API are: |
Signed-off-by: everettraven <[email protected]> Signed-off-by: Mikalai Radchuk <[email protected]>
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.
make generate
is missing it seems. Also we need to squash the commits. Other than that - I think it is ready to go.
58b72ef
to
6d09548
Compare
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.
Did make generate
and 22 squashed commits into 1.
20acf03
v0.36.0 includes this PR |
No description provided.