Skip to content

Delete duplicate resource.Quantity.Copy()#81627

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
tallclair:copy
Aug 22, 2019
Merged

Delete duplicate resource.Quantity.Copy()#81627
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
tallclair:copy

Conversation

@tallclair
Copy link
Copy Markdown
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

Quantity.Copy() and Quantity.DeepCopy() do the same thing. The only different is that Copy() returns a pointer, while DeepCopy() does not. In most cases, DeepCopy() is what is actually needed (even though Copy is more common), so I kept that one.

Does this PR introduce a user-facing change?:

NONE

/sig apimachinery

/assign @thockin

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 20, 2019
@k8s-ci-robot k8s-ci-robot added area/kubectl area/kubelet area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 20, 2019
Copy link
Copy Markdown
Contributor

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

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

/lgtm

no concerns from the sig-node perspective. i trust the compiler to check that this was changed in all the proper places.

/test pull-kubernetes-dependencies

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

/assign @deads2k @derekwaynecarr @erictune

Copy link
Copy Markdown
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I had to read the body of Copy() and DeepCopy() but I am convinced it is equivalent.

Thanks!

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tallclair, thockin

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 Aug 20, 2019
@k8s-ci-robot k8s-ci-robot merged commit 6b47754 into kubernetes:master Aug 22, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 22, 2019
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
Delete duplicate resource.Quantity.Copy()

Kubernetes-commit: 6b47754
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. area/kubectl area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

7 participants