Skip to content

chore: Remove reference of deprecated ioutil package and grpc methods#593

Merged
kubernetes-prow[bot] merged 9 commits into
kubernetes-csi:masterfrom
chimanjain:repl-depr-methods
Jul 1, 2026
Merged

chore: Remove reference of deprecated ioutil package and grpc methods#593
kubernetes-prow[bot] merged 9 commits into
kubernetes-csi:masterfrom
chimanjain:repl-depr-methods

Conversation

@chimanjain

@chimanjain chimanjain commented May 5, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug

/kind cleanup

/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

  • Remove reference of deprecated ioutil package
  • Remove reference of deprecated grpc methods
  • update go version to 1.25.10

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 5, 2026
@k8s-ci-robot k8s-ci-robot requested a review from gnufied May 5, 2026 04:32
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 5, 2026
@k8s-ci-robot k8s-ci-robot requested a review from mauriciopoppe May 5, 2026 04:32
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @chimanjain. Thanks for your PR.

I'm waiting for a kubernetes-csi 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.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 5, 2026
@chimanjain

Copy link
Copy Markdown
Contributor Author

Can the reviewers please verify thiese changes.

@chimanjain

Copy link
Copy Markdown
Contributor Author

@andyzhangx can you please review these changes.

@andyzhangx andyzhangx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot 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 May 14, 2026
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 14, 2026
@chimanjain chimanjain requested a review from andyzhangx May 14, 2026 09:11

@andyzhangx andyzhangx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andyzhangx, chimanjain
Once this PR has been reviewed and has the lgtm label, please assign pohly for approval. For more information see the Code Review Process.

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

Details 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

@chimanjain

Copy link
Copy Markdown
Contributor Author

@pohly can you please review this!

@chimanjain

Copy link
Copy Markdown
Contributor Author

Can the reviewers please verify these changes

@xing-yang

Copy link
Copy Markdown
Contributor

Can you rebase?

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2026
@kubernetes-prow kubernetes-prow Bot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 1, 2026
@xing-yang xing-yang requested a review from Copilot July 1, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the codebase by removing usage of deprecated Go ioutil helpers and deprecated gRPC dialing APIs, updating call sites to use current gRPC credential and client-creation patterns.

Changes:

  • Replaced deprecated gRPC APIs (WithDialer, Dial, WithInsecure) with WithContextDialer, NewClient, and WithTransportCredentials(insecure.NewCredentials()).
  • Replaced ioutil.ReadFile with os.ReadFile in sanity helpers.
  • Updated connection establishment flow to explicitly Connect() and wait for connectivity.Ready.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
utils/grpcutil.go Migrates connection setup to grpc.NewClient/WithContextDialer, adds explicit Connect() + readiness wait loop.
test/driver_test.go Updates test client credentials away from grpc.WithInsecure().
pkg/sanity/sanity.go Replaces ioutil.ReadFile with os.ReadFile and updates default dial options to insecure transport credentials.
driver/mock.go Updates mock driver client connection to use insecure transport credentials.
Comments suppressed due to low confidence (1)

test/driver_test.go:113

  • If Connect fails, the test currently calls t.Errorf but then continues and will defer conn.Close() on a potentially nil connection, causing a panic and masking the real failure. Fail fast (t.Fatalf/return) when the connection cannot be established.
	conn, err := utils.Connect(s.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		t.Errorf("Error: %s", err.Error())
	}
	defer conn.Close()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/grpcutil.go
@xing-yang

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, chimanjain, xing-yang

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

The pull request process is described here

Details 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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2026
@kubernetes-prow kubernetes-prow Bot merged commit 339599e into kubernetes-csi:master Jul 1, 2026
3 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", 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. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants