-
Notifications
You must be signed in to change notification settings - Fork 77
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: add warning for olm.properties being defined when validating csv #217
feat: add warning for olm.properties being defined when validating csv #217
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.
Just a small nit, otherwise this lgtm
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.
/lgtm
pkg/validation/internal/testdata/correct.csv.olm.properties.annotation.yaml
Show resolved
Hide resolved
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.
Looking good. Just one small request.
e533f1c
to
2b2ce7a
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu, tylerslaton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
/hold
- Could we not address this one by:
a) In the CSV validator check if properties are defined and then if yes warning asking to use the file properties instead?
b) In the bundle validator check if the CSV and the properties file are defining the same property? If yes, then raise an error because the bundle is defining the same value twice.
After some thoughts about this scenario, I think that it should not be specific to the max OCP version and we could generalize better this one. Also, by doing the above suggestions seems that we would be able to properly solve the BZ by not allowing any duplications.
Signed-off-by: Tyler Slaton <[email protected]>
2b2ce7a
to
fbd3d5f
Compare
Hi Camilla, so a couple of things.
|
/hold cancel @tylerslaton |
Summary
To sufficiently address this BZ, this PR adds a warning when a user has defined the same property in the CSV's olm.properties annotation as well as in a properties.yaml. This will act as a soft barrier to users doing this in the future.
Why this is needed
As the
olm.properties
annotation currently exists to just maintain backwards compatibility, we should warn newly created bundles from using it. Instead, it is a good idea to push them to use themetadata/properties.yaml
file.