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

Cleanup the deprecated package of k8s.io/utils/pointer. #4719

Merged

Conversation

liangyuanpeng
Copy link
Contributor

@liangyuanpeng liangyuanpeng commented Mar 18, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

1. Bump k8s.io/utils to 20240102154912-e7106e64919e
2. cleanup the deprecated package of pointer, use k8s.io/utils/ptr instead.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Mar 18, 2024
@karmada-bot karmada-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 18, 2024
@liangyuanpeng liangyuanpeng changed the title Cleanup the deprecated package of pointer. Cleanup the deprecated package of k8s.io/utils/pointer. Mar 18, 2024
@XiShanYongYe-Chang
Copy link
Member

Hi @liangyuanpeng the CI is failed.

@liangyuanpeng
Copy link
Contributor Author

liangyuanpeng commented Mar 19, 2024

#3 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/alpine/manifests/3.19.1": net/http: TLS handshake timeout
------
 > [internal] load metadata for docker.io/library/alpine:3.19.1:
------
Dockerfile:15
--------------------
  13 |     # limitations under the License.
  14 |     
  15 | >>> FROM alpine:3.19.1
  16 |     
  17 |     ARG BINARY
--------------------
ERROR: failed to solve: alpine:3.19.1: failed to do request: Head "https://registry-1.docker.io/v2/library/alpine/manifests/3.19.1": net/http: TLS handshake timeout
make: *** [Makefile:58: image-karmada-operator] Error 1
make: Leaving directory '/home/runner/work/karmada/karmada'
Error: Process completed with exit code 2.

CI CLI / init failed with timeout for pull alpine:3.19.1

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 53.33%. Comparing base (d62287f) to head (ed0f26c).

Files Patch % Lines
...core/spreadconstraint/select_clusters_by_region.go 0.00% 1 Missing ⚠️
pkg/util/lifted/federatedhpa.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4719   +/-   ##
=======================================
  Coverage   53.32%   53.33%           
=======================================
  Files         252      252           
  Lines       20539    20539           
=======================================
+ Hits        10953    10954    +1     
+ Misses       8861     8860    -1     
  Partials      725      725           
Flag Coverage Δ
unittests 53.33% <88.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liangyuanpeng liangyuanpeng force-pushed the cleanup_k8sutils_pointer branch 2 times, most recently from e3279a4 to 9968d1f Compare March 26, 2024 05:07
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 26, 2024
@liangyuanpeng
Copy link
Contributor Author

/hold

@karmada-bot karmada-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 26, 2024
@karmada-bot karmada-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 30, 2024
@karmada-bot karmada-bot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 30, 2024
@liangyuanpeng liangyuanpeng force-pushed the cleanup_k8sutils_pointer branch 2 times, most recently from 891c309 to dc741e4 Compare March 30, 2024 12:55
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Mar 30, 2024
@liangyuanpeng
Copy link
Contributor Author

/hold cancel
/assign @RainbowMango
/assign @XiShanYongYe-Chang

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 30, 2024
@RainbowMango
Copy link
Member

@liangyuanpeng
Karmada usually keeps Kubernetes dependencies consistent, that's the reason why we use v0.0.0-20230406110748-d93618cff8a2 (which is consistent with Kubernetes v1.28.5). Given the k8s.io/utils/pointer hasn't been deprecated in v1.28.5(deprecated in v1.29), so I think we can postpone this for a while until we bump Kubernetes v1.29. What do you think?

In addition, we are waiting for kubernetes-sigs/custom-metrics-apiserver#167 to bump Kuberentes dependencies v1.29.

@liangyuanpeng
Copy link
Contributor Author

Thank you for your detailed explanation, it's make sense for me.

@RainbowMango
Copy link
Member

Hi @liangyuanpeng We can get back on this now as the Kubernetes dependencies now is v1.29.4.

Bump k8s.io/utils to 20240102154912-e7106e64919e

We don't need to bump the version, right? We can cleanup the usage of deprecated packages though.

@liangyuanpeng
Copy link
Contributor Author

I will update it ASAP.

@RainbowMango
Copy link
Member

Kindly ping @liangyuanpeng
This is the last blocker of #3835, probably.

Enable static check by removing these lines

@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 28, 2024
…nce a pointer.

The new k8s.io/utils/ptr package provides generic wrapper functions,
which can be used instead of type-specific pointer wrapper functions.
This replaces the latter with the former, and migrates other uses of
the deprecated pointer package to ptr in affacted files.

See kubernetes/utils#283 for details.

Signed-off-by: Lan Liang <[email protected]>
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label May 28, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2024
@karmada-bot karmada-bot merged commit d676996 into karmada-io:master May 28, 2024
12 checks passed
@pulsarsigs-bot pulsarsigs-bot deleted the cleanup_k8sutils_pointer branch May 28, 2024 07:35
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm 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

6 participants