Skip to content
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

✨ Client option types implement client option interfaces #589

Merged

Conversation

alvaroaleman
Copy link
Member

@alvaroaleman alvaroaleman commented Sep 8, 2019

Currently setting multiple ListOptions is pretty annoying, because it is not defined as a function but as an interface, which can not be defined inline.

This PR extends the existing ListOptions struct to implement the ListOption interface to allow using it as a ListOption.

If anyhow possible, I'd be super, super glad if we could get this into the release-0.2 branch as well 😬

/assign @DirectXMan12

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 8, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 8, 2019
@DirectXMan12
Copy link
Contributor

Happy to backport (IIRC, we haven't made any breaking changes yet, so releasing is going to be more-or-less just FF to master for a bit). Do you mind doing this for the rest of the options types too? That way we have consistency.

@DirectXMan12
Copy link
Contributor

But yeah, this seems pretty reasonable

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 9, 2019
@alvaroaleman alvaroaleman changed the title ✨ Allow using ListOptions as ListOption ✨ Client option types implement client option interfaces Sep 9, 2019
@alvaroaleman
Copy link
Member Author

@DirectXMan12 updated the PR to make all the option types implement the corresponding interfaces.

Obviously I am pretty late to the party to mention that, but I think there is a reason ppl commonly use option funcs and not option interfaces..We can probably think about that for a v0.3

@alvaroaleman
Copy link
Member Author

/test pull-controller-runtime-test

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, DirectXMan12

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 /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 16, 2019
@alvaroaleman
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit dd6ead6 into kubernetes-sigs:master Sep 16, 2019
@alvaroaleman
Copy link
Member Author

@DirectXMan12 should I create a cherrypick PR for the release-0.2 branch?

@DirectXMan12
Copy link
Contributor

We'll pull it in as part of the next release -- we generally don't need to cherry-pick until we start breaking things, and I don't think we've merged anything breaking.

You can do a release PR though -- just ask for a merge of master into release-0.2, and check the release notes by running

$ git checkout release-0.2
$ git merge master
$ ./hack/release/release-notes.sh

DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants