-
Notifications
You must be signed in to change notification settings - Fork 252
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(registry): Add label dependency constraint and property #406
feat(registry): Add label dependency constraint and property #406
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dinhxuanvu 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 |
/hold until PR is reviewed and lgtm-ed. |
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 some minor comments about tests. Otherwise lgtm
manifests/etcd/0.9.2/etcdoperator.v0.9.2.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
/retest |
...cies_bundle/invalid_label_dependency/manifests/etcdbackups.etcd.database.coreos.com.crd.yaml
Show resolved
Hide resolved
2c33532
to
ee74e2d
Compare
pkg/lib/bundle/testdata/validate/valid_bundle/metadata/dependencies.yaml
Outdated
Show resolved
Hide resolved
ee74e2d
to
79f1195
Compare
I wonder if this e2e-aws failure is valid or not. The error message doesn't seem to be OLM-related. |
1. Introduce a new type of dependency constraint named `olm.label` which represents the constraints that are based on CSV labels. 2. The new label property is parsed from CSV labels. Signed-off-by: Vu Dinh <[email protected]>
The label properties are now specified in CSV annotations. Signed-off-by: Vu Dinh <[email protected]>
999b278
to
2e30704
Compare
/hold cancel |
/retest |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
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.
Couple of non-blocking nits. Otherwise lgtm.
if csv, err := bundle.ClusterServiceVersion(); err == nil { | ||
annotations := csv.ObjectMeta.GetAnnotations() | ||
if v, ok := annotations[registry.PropertyKey]; ok { | ||
var props []registry.Property |
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.
var props []registry.Property | |
var properties []registry.Property |
if v, ok := annotations[registry.PropertyKey]; ok { | ||
var props []registry.Property | ||
if err := json.Unmarshal([]byte(v), &props); err == nil { | ||
for _, prop := range props { |
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.
for _, prop := range props { | |
for _, property := range properties { |
|
||
An example of a `dependencies.yaml` that specifies Prometheus operator and etcd CRD dependencies: | ||
|
||
``` | ||
dependencies: | ||
- type: olm.package | ||
value: |
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.
nit
: Noise.
Looks like it's been lgtm-ed, if approved please resolve my comments they're very minor. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
olm.label
whichrepresents the constraints that are based on CSV labels.
Signed-off-by: Vu Dinh [email protected]
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs