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

add uint64 and uint to pointer pkg #253

Merged
merged 1 commit into from Aug 12, 2022

Conversation

kschoche
Copy link
Contributor

@kschoche kschoche commented Aug 8, 2022

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR adds support for interacting with 32 and 64bit unsigned ints in the pointer package.
We wanted to standardize on the pointer package but found that it was lacking unsigned int support which is commonly used in k8s and applications interacting with k8s.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
I'm not 100% sure if it makes sense to add the back-compatibility pieces which I copied from the existing Intand Int64 implementations. If not I can back them out and just leave the new pieces.

Release note:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 8, 2022
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 8, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kschoche / name: Kyle Schochenmaier (d45ae35)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 8, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @kschoche!

It looks like this is your first PR to kubernetes/utils 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/utils has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 8, 2022
@apelisse
Copy link
Member

apelisse commented Aug 8, 2022

I'd sort of expect all these things to now be defined by golang since I'm assuming they can be implemented with generics?

@kschoche
Copy link
Contributor Author

kschoche commented Aug 9, 2022

I'd sort of expect all these things to now be defined by golang since I'm assuming they can be implemented with generics?

Hi @apelisse, thanks for the reply!
I had seen that there have been some PRs already that attempted to introduce generics to the pointer package PR but it seems like there were some blockers with the requirements for using go 1.18. Is that still the case? If so, I'm wondering what to do in the meantime for those of us who may also have the same concerns?

The use case I'm trying to address is to provide coverage in the pointer package for Uint64 as we are trying to use it with some CRD code that uses it for things like versions and timestamps.

I do understand that an obvious+easy answer is for users to BYO functionality, which is what we already do, and so this PR is more of a "nice to have" vs a necessity.

Thoughts?
Thanks!
~Kyle

@apelisse
Copy link
Member

apelisse commented Aug 9, 2022

I guess I don't see any problem with this PR being merged in the mean time.

Where do you need this code? Or is it strictly hypothetical?

@kschoche
Copy link
Contributor Author

kschoche commented Aug 9, 2022

Cool.
I ran into this while doing some code cleanup on hashicorp/consul-k8s where we've to date just been rolling our own version of the pointer pkg for interacting with CR specs in our CRD controllers. Right now if I could get this merged then I could fully move over to pointer.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 10, 2022
@kschoche kschoche marked this pull request as ready for review August 10, 2022 14:46
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2022
@kschoche
Copy link
Contributor Author

Hi @apelisse - sorry for the ping here, but I just wanted to double-check if there were any additional changes you might see needed for this PR while it's fresh in my mind. Cheers.

@apelisse
Copy link
Member

Sorry, I missed your reply.

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, kschoche

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 12, 2022
@k8s-ci-robot k8s-ci-robot merged commit ad59060 into kubernetes:master Aug 12, 2022
@kschoche kschoche deleted the add_uint_to_pointer_pkg branch August 12, 2022 20:52
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. kind/feature Categorizes issue or PR as related to a new feature. 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