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

Bad deprecation notices in 0.27.1 ?! Referenced PollWithContextTimeout does not exist ?! #153

Closed
andreas-kupries opened this issue May 2, 2023 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@andreas-kupries
Copy link

After a bump to 0.27.1 the golang-ci-linter told me

wait.PollImmediate is deprecated: This method does not return errors from context, use PollWithContextTimeout

Looking at the 0.27.1 documentation I find PollWithContext, but no PollWithContextTimeout.

https://pkg.go.dev/k8s.io/apimachinery/pkg/util/wait#PollWithContext
https://pkg.go.dev/search?q=PollWithContextTimeout&m=symbol

Grepping the package sources I find that PollWithContextTimeout is only referenced in the deprecation notices in the comments. No implementation is found. See below.

The nearest similar function looks to be https://pkg.go.dev/k8s.io/apimachinery/pkg/util/wait#PollUntilContextTimeout

% grep -rn PollWithContextTimeout .
./k8s.io/apimachinery@v0.27.1/pkg/util/wait/poll.go:44:// inline usage. All other behavior is identical to PollWithContextTimeout.
./k8s.io/apimachinery@v0.27.1/pkg/util/wait/poll.go:62:// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
./k8s.io/apimachinery@v0.27.1/pkg/util/wait/poll.go:81:// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
./k8s.io/apimachinery@v0.27.1/pkg/util/wait/poll.go:153:// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
./k8s.io/apimachinery@v0.27.1/pkg/util/wait/poll.go:171:// Deprecated: This method does not return errors from context, use PollWithContextTimeout.

What is the actual method to use instead of the deprecated ones ?

@laverya
Copy link

laverya commented May 2, 2023

See also kubernetes/kubernetes#116712

alex-aizman added a commit to NVIDIA/aistore that referenced this issue May 18, 2023
* except k8s.io/api and friends - see:
* kubernetes/apimachinery#153
* go get -u ./...
* go get -u k8s.io/apimachinery@v0.26.1

Signed-off-by: Alex Aizman <alex.aizman@gmail.com>
@damdo
Copy link
Member

damdo commented May 26, 2023

Fixed by https://github.com/kubernetes/kubernetes/pull/117143/files
I think we can close this.

@iblancasa
Copy link

I can see this problem in v0.27.3:

SA1019: wait.Poll is deprecated: This method does not return errors from context, use PollWithContextTimeout. Note that the new method will no longer return ErrWaitTimeout and instead return errors defined by the context package. Will be removed in a future release.

@till
Copy link

till commented Sep 13, 2023

WWIW, can also confirm on 0.27.5.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 27, 2024
@till
Copy link

till commented Feb 27, 2024

I understand that no one has time, but can no one look into this and see if this is a bug?

@kaovilai
Copy link

kaovilai commented Mar 6, 2024

can no one look

yep no one looked :)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
@k8s-ci-robot
Copy link

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

8 participants