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

Fixing all deprecated use of sets.String #2915

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

navinag1989
Copy link
Contributor

@navinag1989 navinag1989 commented Dec 13, 2023

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

This PR is for removing deprecated use of sets.String and moving to new generic set type.

Partially knative/serving#14692

@knative-prow knative-prow bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/test-and-release labels Dec 13, 2023
@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 13, 2023
Copy link

knative-prow bot commented Dec 13, 2023

Welcome @navinag1989! It looks like this is your first PR to knative/pkg 🎉

Copy link

knative-prow bot commented Dec 13, 2023

Hi @navinag1989. 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.

@Leo6Leo
Copy link
Member

Leo6Leo commented Dec 13, 2023

/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 Dec 13, 2023
@krsna-m krsna-m requested a review from cardil December 13, 2023 19:25
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d513e48) 81.82% compared to head (29adb1f) 81.80%.
Report is 6 commits behind head on main.

Files Patch % Lines
logging/object_encoders.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2915      +/-   ##
==========================================
- Coverage   81.82%   81.80%   -0.03%     
==========================================
  Files         167      167              
  Lines       10231    10231              
==========================================
- Hits         8372     8369       -3     
- Misses       1612     1614       +2     
- Partials      247      248       +1     

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

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

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

See inline comments.

@ReToCode
Copy link
Member

Heads up, this will lead to updates required in net-kourier & serving (which is expected and fine).

@ReToCode
Copy link
Member

/assign @skonto

configmap/parse.go Outdated Show resolved Hide resolved
@skonto
Copy link
Contributor

skonto commented Dec 18, 2023

@navinag1989 could you also prepare the PRs for the Serving and net-kourier stuff?

Btw the full list of pending deprecation issues is on this PR:

configmap/informer/synced_callback.go:110:10: SA1019: wait.ErrWaitTimeout is deprecated: This type will be made private in favor of Interrupted() for checking errors or ErrorInterrupted(err) for returning a wrapped error. (staticcheck)
controller/controller.go:767:9: SA1019: wait.PollImmediateUntil is deprecated: This method does not return errors from context, use PollWithContextCancel. 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. (staticcheck)
controller/controller_test.go:796:5: SA1019: wait.PollImmediateUntil is deprecated: This method does not return errors from context, use PollWithContextCancel. 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. (staticcheck)
controller/controller_test.go:848:5: SA1019: wait.PollImmediateUntil is deprecated: This method does not return errors from context, use PollWithContextCancel. 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. (staticcheck)
controller/two_lane_queue_test.go:76:5: SA1019: wait.PollImmediate 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. (staticcheck)
controller/two_lane_queue_test.go:92:5: SA1019: wait.PollImmediate 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. (staticcheck)
injection/sharedmain/main.go:77:12: SA1019: wait.PollImmediate 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. (staticcheck)
leaderelection/context_test.go:48:19: SA1019: sets.String is deprecated: use generic Set instead. new ways: s1 := Set[string]{} s2 := New[string]() (staticcheck)
leaderelection/context_test.go:181:19: SA1019: sets.String is deprecated: use generic Set instead. new ways: s1 := Set[string]{} s2 := New[string]() (staticcheck)
test/spoof/response_checks.go:66:15: SA1019: sets.String is deprecated: use generic Set instead. new ways: s1 := Set[string]{} s2 := New[string]() (staticcheck)

The last three are mentioned also in another comment above. The others can be addressed in another PR.

@ReToCode
Copy link
Member

ReToCode commented Jan 3, 2024

Looks good to me now, @skonto mind taking another look?
@navinag1989 can you create downstream PRs for the failing builds using this pkg branch to have PRs ready when we merge this PR?

@navinag1989
Copy link
Contributor Author

Sure @ReToCode , I will keep the PRs ready by this weekend.

@dprotaso
Copy link
Member

dprotaso commented Jan 8, 2024

/lgtm
/approve

thanks for the help @navinag1989

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

knative-prow bot commented Jan 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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/test-and-release 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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

5 participants