Skip to content

Conversation

@retornam
Copy link

Upgrade Golang to version to 1.25

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

It upgrades Golang version to 1.25 and golangci-lint to version 2

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 22, 2025
@k8s-ci-robot
Copy link
Contributor

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

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 22, 2025
Copy link
Member

@andyzhangx andyzhangx left a comment

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 Aug 23, 2025
@retornam
Copy link
Author

/retest

@coveralls
Copy link

coveralls commented Aug 23, 2025

Pull Request Test Coverage Report for Build 19893705692

Details

  • 15 of 18 (83.33%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.507%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/smb/controllerserver.go 2 3 66.67%
pkg/smb/nodeserver.go 9 11 81.82%
Totals Coverage Status
Change from base Build 19844492355: 0.0%
Covered Lines: 1125
Relevant Lines: 1433

💛 - Coveralls

@retornam
Copy link
Author

/retest

@andyzhangx andyzhangx requested a review from Copilot August 26, 2025 03:16
Copy link

Copilot AI left a comment

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 upgrades the project from Go version 1.24 to 1.25 and updates golangci-lint configuration to version 2, along with code quality improvements and formatting fixes.

  • Updates Go version from 1.24 to 1.25 across all GitHub workflow files
  • Upgrades golangci-lint from v1.64 to v2.4.0 with new configuration format
  • Applies various code formatting and style improvements identified by the updated linter

Reviewed Changes

Copilot reviewed 36 out of 39 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Updates Go version from 1.24 to 1.25
.golangci.yml Upgrades golangci-lint configuration to version 2 format
.github/workflows/*.yaml Updates Go versions in CI workflows from older versions to 1.25
pkg/smb/*.go Fixes octal literals, variable declarations, error messages, and imports formatting
test/e2e/*.go Improves import formatting and API usage patterns
release-tools/filter-junit.go Updates file permissions to use octal literal format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


for _, option := range sensitiveMountOptions {
if _, err := file.Write([]byte(fmt.Sprintf("%s\n", option))); err != nil {
if _, err := fmt.Fprintf(file, "%s\n", option); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

not sure whether it's an identical change, is this part of golint change? it seems not

Copy link
Author

Choose a reason for hiding this comment

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

it is. I'll revert if you prefer the earlier version and add an ignore.

Copy link
Member

Choose a reason for hiding this comment

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

pls revert it, thx

Choose a reason for hiding this comment

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

@andyzhangx sorry for the delay. done

Copy link
Author

Choose a reason for hiding this comment

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

@andyzhangx can you please review this.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2025
@retornam
Copy link
Author

retornam commented Dec 2, 2025

/retest-required

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 2, 2025
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/retest

@andyzhangx
Copy link
Member

andyzhangx commented Dec 3, 2025

@retornam can you use golang 1.25.5 to build in trivy action?

┌─────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability  │ Severity │ Status │ Installed Version │  Fixed Version  │                           Title                            │
├─────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤
│ stdlib  │ CVE-2025-61727 │ UNKNOWN  │ fixed  │ v1.25.4           │ 1.24.11, 1.25.5 │ Improper application of excluded DNS name constraints when │
│         │                │          │        │                   │                 │ verifying wildcard names in...                             │
│         │                │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-61727                 │
│         ├────────────────┤          │        │                   │                 ├────────────────────────────────────────────────────────────┤
│         │ CVE-2025-61729 │          │        │                   │                 │ Within HostnameError.Error(), when constructing an error   │

@andyzhangx
Copy link
Member

  Error: pkg/smb/nodeserver.go:37:2: SA1019: "golang.org/x/net/context" is deprecated: Use the standard library context package instead. (staticcheck)
  	"golang.org/x/net/context"
  	^
  Error: pkg/smb/smb_common_linux.go:50:17: QF1012: Use fmt.Fprintf(...) instead of Write([]byte(fmt.Sprintf(...))) (staticcheck)
  			if _, err := file.Write([]byte(fmt.Sprintf("%s\n", option))); err != nil {
  			             ^

@retornam retornam force-pushed the retornam/edits branch 5 times, most recently from d38325a to 98d7b5b Compare December 3, 2025 22:44
@retornam
Copy link
Author

retornam commented Dec 3, 2025

/retest-required

@retornam
Copy link
Author

retornam commented Dec 3, 2025

@andyzhangx i fixed the golangci-lint errors by ignoring that file. The windows test failures seem to be that it cant find the service account token, i'd like some guidance on how to fix as I dont have access to a windows machine to run tests on

@k8s-ci-robot
Copy link
Contributor

@retornam: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-csi-driver-smb-e2e-windows-2022 98d7b5b link false /test pull-csi-driver-smb-e2e-windows-2022
pull-csi-driver-smb-verify ddb5af6 link true /test pull-csi-driver-smb-verify
pull-csi-driver-smb-e2e-windows-2019 ddb5af6 link false /test pull-csi-driver-smb-e2e-windows-2019

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants