-
Notifications
You must be signed in to change notification settings - Fork 36
proposal: simplify labels.Requirement creation #446
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
proposal: simplify labels.Requirement creation #446
Conversation
We can skip validations performed by [labels.NewRequirement](https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#NewRequirement) as operator is fixed, key is constant, and value is extracted from Custom Resources. [SelectorFromSet](https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#SelectorFromSet) does not perform any validation, which means the server will reject the request if the Set contains invalid values. Signed-off-by: Francesco Ilario <filario@redhat.com>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #446 +/- ##
==========================================
+ Coverage 78.14% 78.36% +0.22%
==========================================
Files 41 41
Lines 2681 2672 -9
==========================================
- Hits 2095 2094 -1
+ Misses 491 487 -4
+ Partials 95 91 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
👍
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, filariow, MatousJobanek, mfrancisc 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 |
9ed22dc
into
codeready-toolchain:master
We can skip validations performed by labels.NewRequirement as operator is fixed, key is constant, and value is extracted from Custom Resources.
SelectorFromSet does not perform any validation, which means the server will reject the request if the Set contains invalid values.