Ensure unique paths for excluded fields in compatibility requirement#2720
Ensure unique paths for excluded fields in compatibility requirement#2720JoelSpeed wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Hello @JoelSpeed! Some important instructions when contributing to openshift/api: |
|
/test verify I'm unable to see why this failed, the file it is asking to track is already tracked 🤔 |
ⓘ Your monthly quota for Qodo has expired. Upgrade your plan ⓘ Paying users. Check that your Qodo account is linked with this Git user account |
| // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, y.path == x.path))",message="each path in the list must be unique." | ||
| // +listType=atomic |
There was a problem hiding this comment.
Any particular reason why this needs to be an atomic list instead of converting this to +listType=map with a key of path?
There was a problem hiding this comment.
We had this discussion on the initial PR, we explicitly expect the writer to this API to write this list as an atomic unit. We aren't expecting multiple writers for this list ever. So atomic makes more sense based on the expected use case
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: everettraven The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@JoelSpeed: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
I can't currently think of any reason why we wouldn't want these to be unique. There are two dimensions here, path and versions. If you want to specify the same path for multiple versions, this can be done within a single list item. If you want to specify for all versions, you omit the versions field completely.
Ensuring these are unique means we don't have to worry about deduplicating within the webhook logic
CC @mdbooth