-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(olm-catalog) : add missing fields with placehoders in the CSV #2095
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
feat(olm-catalog) : add missing fields with placehoders in the CSV #2095
Conversation
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 need to make sure the user has replaced these field's text, which we are not doing in these changes in getEmptyRequiredCSVFields()
. I suggest adding mandatory field checks in getEmptyRequiredCSVFields()
and not setting these to placeholder values in setCSVDefaultFields()
, since the former function will pass on placeholder data when it should not.
Hi @estroz, Really tks for your review. The
I mean: As I developer, I would like to generate the CSV with all fields which are required for the project works successfully in OLM and be accepted on it. Is it make sense? |
@camilamacedo86 passing Furthermore I'm fairly certain operator-framework/getting-started#43 is caused by an RBAC issue and not minikube version. I've seen the minikube version status before on a successfully deployed CSV. |
...estdata/deploy/olm-catalog/app-operator/0.1.0/app-operator.v0.1.0.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
/test e2e-aws-go |
Hi @joelanford and @dmesser, @estroz asked for I raise you both here and ask your inputs as well. |
If I'm understanding @estroz's comments correctly, I'm in agreement with him. If we're trying to solve the problem of helping the user generate a valid CSV, using placeholders won't help because they will obscure the fact that a particular field is not populated correctly. I agree that the static bundle validation library is the correct solution here. |
HI @estroz and @joelanford, It was changed as we spoke. Then, we are here just adding icon.spec which was missing in the WARN which shows enough so far for we attend the community request. Are you ok with? Could we move forward with this PR? |
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.
@camilamacedo86 you could change this line to use log.Errorf()
since these fields are required.
Hi @estroz,
The WARN appears when we exec the command to generate the file. So, IMO shows an ERROR message by default is a really bad user experience and will be very confusing. I do not think that we should do it. |
Hi @estroz, The docs are updated as well as we spoke about it. Please, let me know if you are ok with. |
/test images |
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.
@estroz are we planning to replace this logic with the static bundle validator? If so, I would only recommend that we make this change if the static bundle validator is also going to include this check.
I'm pretty sure spec.icon
is optional for OLM purposes, right? We probably need to distinguish optional and required fields. As is, this PR is grouping spec.icon
in with other required fields and I'm not sure that's the impression we want to give to users.
Thoughts?
@@ -93,6 +94,7 @@ Required: | |||
* `spec.displayName` _(user)_ : a name to display for the Operator in Operator Hub. | |||
* `spec.keywords` _(user)_ : a list of keywords describing the Operator. | |||
* `spec.maintainers` _(user)_ : a list of human or organizational entities maintaining the Operator, with a `name` and `email`. | |||
* `spec.icon` _(user)_ : a Base64 encoded image. E.g `cat image.png | base64` or `base64 -w 0 image.jpg`. |
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 we do go forward with this PR, we should be explicit about which image types are supported.
But, let's hold off on further changes until @estroz weighs in on my previous question so we don't use CI resources unnecessarily.
Co-Authored-By: Joe Lanford <[email protected]>
Hi @joelanford,
Currently, the WARN is done for:
In my understanding, the I understand that all this validation will be improved in the future with new features as we spoke about. It should be just a small pr to help users until there. Shows that we will know better how we can go forward when the operator-framework/api#3 be done. I am looking for your positions. @joelanford and @estroz |
@joelanford I was under the impression that The api library will perform these checks. EDIT: |
Hi @estroz @joelanford, It is not clear for me the comments. Could we not move forward with this small one? What you are not ok with here and should be changed? Or you would like to close this one? |
Alright, so my high-level understanding is that the validations done by operator-courier will be replaced with the validations performed by the static bundle validation library. Since our current CSV generation code does not distinguish between required and recommended fields and since we'll be migrating to use the static bundle validation library, my vote would be to close this PR and update #2071 to reflect our plans to solve it via with the validation library. @estroz Once the validation library is merged, we plan to integrate it into a new scorecard test. Will we also integrate it into |
Closing this one after the discussions and definitions over how it will be addressed. |
@joelanford yes it will be. |
Description of the change:
Add warn for spec.icon.
Motivation for the change:
Closes: