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

Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout #957

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

prashantrewar
Copy link
Contributor

Changes

  • Replace usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout

/kind

Fixes #

Release Note

NONE

Docs


Copy link

knative-prow bot commented Apr 2, 2024

@prashantrewar: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

Changes

  • Replace usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout

/kind

Fixes #

Release Note

NONE

Docs


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.

Copy link

knative-prow bot commented Apr 2, 2024

Welcome @prashantrewar! It looks like this is your first PR to knative/networking 🎉

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 2, 2024
Copy link

knative-prow bot commented Apr 2, 2024

Hi @prashantrewar. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@dprotaso
Copy link
Member

dprotaso commented Apr 2, 2024

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 2, 2024
@dprotaso
Copy link
Member

dprotaso commented Apr 2, 2024

I believe the test is failing because wait.ErrWaitTimeout is not longer returned by these new functions

if !errors.Is(err, wait.ErrWaitTimeout) {
t.Error("Unexpected error =", err)
}

According to the docs https://pkg.go.dev/k8s.io/apimachinery/pkg/util/wait#Poll

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.

@dprotaso
Copy link
Member

dprotaso commented Apr 2, 2024

You'll also need to verify if wait.ErrWaitTimeout is used anywhere in the serving/net- repo and update those accordingly.

@dprotaso
Copy link
Member

dprotaso commented Apr 2, 2024

I don't think it's used anywhere in code that isn't tests so I think we should be ok

@ReToCode
Copy link
Member

ReToCode commented Apr 3, 2024

/retest

@ReToCode
Copy link
Member

ReToCode commented Apr 3, 2024

/test unit-tests

@ReToCode
Copy link
Member

ReToCode commented Apr 3, 2024

@prashantrewar mind taking a look at the test failures?

@dprotaso
Copy link
Member

dprotaso commented Apr 9, 2024

@prashantrewar just following up - are you able to address the unit test failures?

@prashantrewar
Copy link
Contributor Author

@prashantrewar just following up - are you able to address the unit test failures?

@dprotaso, I tried, and I found that wait.ErrWaitTimeout is also deprecated, which is why the test failed. Should I replace this also?

@dprotaso
Copy link
Member

dprotaso commented Apr 9, 2024

Should I replace this also?

Yeah update the test

@prashantrewar
Copy link
Contributor Author

Should I replace this also?

Yeah update the test

@dprotaso Done!

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (75762ca) to head (9af1ce7).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #957      +/-   ##
==========================================
- Coverage   93.43%   93.41%   -0.02%     
==========================================
  Files          36       36              
  Lines        1249     1003     -246     
==========================================
- Hits         1167      937     -230     
+ Misses         69       53      -16     
  Partials       13       13              

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

@dprotaso
Copy link
Member

/retest

@dprotaso
Copy link
Member

/lgtm
/approve

thanks @prashantrewar

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2024
Copy link

knative-prow bot commented Apr 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, prashantrewar

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2024
@knative-prow knative-prow bot merged commit a3d8b0f into knative:main Apr 10, 2024
18 checks passed
@prashantrewar prashantrewar deleted the replace-wait.pollImmediate branch April 10, 2024 21:53
@prashantrewar
Copy link
Contributor Author

Thank you @dprotaso for guidance and support.

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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants