karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.14k stars 813 forks source link

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

Open liangyuanpeng opened 2 months ago

liangyuanpeng commented 2 months ago

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?:

XiShanYongYe-Chang commented 2 months ago

Hi @liangyuanpeng the CI is failed.

liangyuanpeng commented 2 months ago
#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 commented 2 months ago

Codecov Report

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

Project coverage is 51.77%. Comparing base (6534ffb) to head (dc741e4).

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

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4719 +/- ## ========================================== + Coverage 51.76% 51.77% +0.01% ========================================== Files 250 250 Lines 24980 24980 ========================================== + Hits 12930 12933 +3 + Misses 11340 11338 -2 + Partials 710 709 -1 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4719/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/karmada-io/karmada/pull/4719/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `51.77% <88.88%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

liangyuanpeng commented 1 month ago

/hold

liangyuanpeng commented 1 month ago

/reopen

karmada-bot commented 1 month ago

@liangyuanpeng: Failed to re-open PR: state cannot be changed. There are no new commits on the liangyuanpeng:cleanup_k8sutils_pointer branch.

In response to [this](https://github.com/karmada-io/karmada/pull/4719#issuecomment-2028041919): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
liangyuanpeng commented 1 month ago

/reopen

karmada-bot commented 1 month ago

@liangyuanpeng: Failed to re-open PR: state cannot be changed. There are no new commits on the liangyuanpeng:cleanup_k8sutils_pointer branch.

In response to [this](https://github.com/karmada-io/karmada/pull/4719#issuecomment-2028043078): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
karmada-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign rainbowmango after the PR has been reviewed. You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
karmada-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign rainbowmango after the PR has been reviewed. You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
liangyuanpeng commented 1 month ago

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

RainbowMango commented 1 month ago

@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 https://github.com/kubernetes-sigs/custom-metrics-apiserver/issues/167 to bump Kuberentes dependencies v1.29.

liangyuanpeng commented 1 month ago

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

RainbowMango commented 1 week ago

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.