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

Update go to 1.22.3 #252

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

bells17
Copy link
Contributor

@bells17 bells17 commented May 10, 2024

Bump Go version to 1.22.3 due to vulnerabilities in Go 1.22.2 identified by the Trivy vulnerability scanner.

kubernetes-csi/livenessprobe#262
https://github.com/kubernetes-csi/livenessprobe/actions/runs/9034677921/job/24827762006?pr=262

Go updated to 1.22.3

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label May 10, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. release-note-none Denotes a PR that doesn't merit a release note. labels May 10, 2024
@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

/retitle Update go to 1.22.3

@k8s-ci-robot k8s-ci-robot changed the title Bump to Go 1.22.3 Update go to 1.22.3 May 10, 2024
@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

/cc @jsafrane

@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

It appears that pull-kubernetes-csi-release-tools-external-snapshotter test is in a state where running go mod tidy in response to the Go version upgrade results in changes to the go modules. Therefore, after merging this PR, it seems that updating the go modules version will be necessary on the external-snapshotter side.

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_csi-release-tools/252/pull-kubernetes-csi-release-tools-external-snapshotter/1788961194170650624

@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

/cc @xing-yang

@xing-yang
Copy link
Contributor

I wonder why it failed due to recently added API validation rules:

diff --git a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/types.go b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/types.go
index b8de6494..4110c292 100644
--- a/vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/types.go
+++ b/vendor/github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumegroupsnapshot/v1alpha1/types.go
@@ -36,6 +36,7 @@ type VolumeGroupSnapshotSpec struct {
 	// class will be used.
 	// Empty string is not allowed for this field.
 	// +optional
+	// +kubebuilder:validation:XValidation:rule="size(self) > 0",message="volumeGroupSnapshotClassName must not be the empty string when set"
 	VolumeGroupSnapshotClassName *string `json:"volumeGroupSnapshotClassName,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotClassName"`
 }

@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

Apologies, it seems that there were differences unrelated to the Go version, causing make test-vendor to fail.
I have created a PR to fix this issue at the following link:
kubernetes-csi/external-snapshotter#1084

@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

Based on the output below, it appears that make test-vendor is being skipped.

### test-vendor:
Repo uses 'go mod'.
Skipping vendor check because the Prow pre-submit job does not affect dependencies.

kubernetes-csi/external-snapshotter#1073
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-snapshotter/1073/pull-kubernetes-csi-external-snapshotter-unit/1787547224096378880

@bells17
Copy link
Contributor Author

bells17 commented May 10, 2024

It seems that the process is skipped under the following conditions:

if [ "${JOB_NAME}" ] &&
( [ "${JOB_TYPE}" != "presubmit" ] ||
[ "$( (git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools;
git diff "${PULL_BASE_SHA}..HEAD" | grep -e '^@@.*@@ import (' -e '^[+-]import') |
wc -l)" -eq 0 ] ); then
echo "Skipping vendor check because the Prow pre-submit job does not affect dependencies."

@bells17
Copy link
Contributor Author

bells17 commented May 11, 2024

/retest

@bells17
Copy link
Contributor Author

bells17 commented May 11, 2024

@xing-yang The pull-kubernetes-csi-release-tools-external-provisioner test has passed as a result of merging the following PR:
Would you please review this PR again when you have a moment?

kubernetes-csi/external-snapshotter#1084

@xing-yang
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit adb3af9 into kubernetes-csi:master May 13, 2024
7 checks passed
@bells17 bells17 deleted the update-go-version branch May 13, 2024 01:52
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants