Skip to content

Conversation

@shashankram
Copy link
Contributor

@shashankram shashankram commented Sep 8, 2025

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 8, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 8, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @shashankram. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 8, 2025
@shashankram
Copy link
Contributor Author

cc @JoelSpeed @alvaroaleman who reviewed #1212

@JoelSpeed
Copy link
Contributor

@shashankram Would you mind splitting this PR in two? Moving to ginkgo v2 is definitely something we should do, but lets not muddle it with the rest of this PR, they should be separate

@shashankram
Copy link
Contributor Author

@shashankram Would you mind splitting this PR in two? Moving to ginkgo v2 is definitely something we should do, but lets not muddle it with the rest of this PR, they should be separate

@JoelSpeed done

@JoelSpeed
Copy link
Contributor

@shashankram Did you create a separate PR for the ginkgo v2 stuff? If you haven't, are you able to?

Also please make sure to update the PR description

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, in a lot of cases, adding a MinProperties would be sufficient wouldn't it? You'd be able to specify that at least one property must be set on the object?

This is helpful though in the case where you've mixed your fields with other fields and you need at least one of them, without caring about their siblings?

// +kubebuilder:validation:AtMostOneOf=a;b
// +kubebuilder:validation:ExactlyOneOf=c;d
// +kubebuilder:validation:AtLeastOneOf=e;f
type TypeWithAllOneofs struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the others?

Suggested change
type TypeWithAllOneofs struct {
type TypeWithAllOneOfs struct {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It currently matches the casing with other type names

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, odd, I thought we should have gone with OneOf, i was suggesting to align to the comment lines 84-86. We probably should have done that casing for the previous cases as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to increase the scope of this PR, given that has been an issue with other renames/formatting in previous PRs of mine. Let's keep this as-is since it has no functional effects

@shashankram
Copy link
Contributor Author

In theory, in a lot of cases, adding a MinProperties would be sufficient wouldn't it? You'd be able to specify that at least one property must be set on the object?

This is helpful though in the case where you've mixed your fields with other fields and you need at least one of them, without caring about their siblings?

Yes, this is quite a common scenario so this marker would be useful.

@shashankram
Copy link
Contributor Author

@shashankram Did you create a separate PR for the ginkgo v2 stuff? If you haven't, are you able to?

I'll open a separate PR once this merges

@shashankram
Copy link
Contributor Author

@JoelSpeed this should be good to merge

@sbueringer
Copy link
Member

/assign

I'll take a look once Joel lgtm's

@sbueringer
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 16, 2025
@JoelSpeed
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 17, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: b63c502c717b5c4cff890eb0cadba775e992ef5d

@sbueringer sbueringer added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 17, 2025
@sbueringer
Copy link
Member

Thank you!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer, shashankram

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 17, 2025
@k8s-ci-robot k8s-ci-robot merged commit 8f0c1b1 into kubernetes-sigs:main Sep 17, 2025
13 checks passed
@shashankram shashankram deleted the atleast-oneof branch September 18, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants