Skip to content

chore(deps): bump Go from 1.24.12 to 1.25.12#6104

Merged
RongGu merged 6 commits into
fluid-cloudnative:masterfrom
cheyang:update_golang_version
Jul 11, 2026
Merged

chore(deps): bump Go from 1.24.12 to 1.25.12#6104
RongGu merged 6 commits into
fluid-cloudnative:masterfrom
cheyang:update_golang_version

Conversation

@cheyang

@cheyang cheyang commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Go 1.24 reached EOL on 2026-02-11; move to the maintained 1.25.x line. No dependency changes required — controller-runtime v0.17.5 and k8s.io v0.29.x only require Go 1.21.

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Go version from 1.24.12 to 1.25.12 across CI configurations, Dockerfiles, and the go.mod file. The review feedback suggests specifying only the major/minor version (go 1.25) in the go.mod file and using the toolchain directive for the exact patch version, ensuring better compatibility for downstream consumers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread go.mod Outdated
module github.com/fluid-cloudnative/fluid

go 1.24.12
go 1.25.12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Specifying a patch version in the 'go' directive of 'go.mod' (e.g., 'go 1.25.12') is discouraged because it forces all downstream consumers of this module to use at least Go 1.25.12 to compile their projects. Since Go 1.21, the idiomatic approach is to specify the major/minor version in the 'go' directive (e.g., 'go 1.25') to define the minimum language version, and use the 'toolchain' directive (e.g., 'toolchain go1.25.12') to specify the exact toolchain version for development and building. This allows downstream consumers with older patch versions of Go 1.25 to still import and compile your module.

Suggested change
go 1.25.12
go 1.25
toolchain go1.25.12

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point — adopted in 171e478. Kept the language floor at go 1.25 and pinned the build toolchain via toolchain go1.25.12, so downstream importers on any 1.25.x are not forced onto patch .12.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.83%. Comparing base (afca615) to head (51ab40e).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6104      +/-   ##
==========================================
+ Coverage   64.76%   64.83%   +0.06%     
==========================================
  Files         485      485              
  Lines       33895    33966      +71     
==========================================
+ Hits        21952    22021      +69     
+ Misses      10220    10212       -8     
- Partials     1723     1733      +10     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the repository’s Go toolchain/version references from 1.24.12 to 1.25.12 across CI and container build images, aligning builds with a maintained Go release line.

Changes:

  • Bump the Go version used in GitHub Actions workflows to 1.25.12.
  • Update Go builder base images in project Dockerfiles to golang:1.25.12-bookworm (with updated digests where pinned).
  • Update CI configs (Travis, CircleCI) and the e2e emulator Dockerfile to use Go 1.25.12.

Reviewed changes

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

Show a summary per file
File Description
test/gha-e2e/jindo/oss-emulator/Dockerfile Bumps the Go builder image used for the OSS emulator build.
go.mod Updates the declared Go version for the module.
docker/Dockerfile.webhook Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.vineyardruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.thinruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.juicefsruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.jindoruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.efcruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.dataset Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.csi Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.cacheruntime Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.application Updates pinned Go builder image tag/digest to 1.25.12.
docker/Dockerfile.alluxioruntime Updates pinned Go builder image tag/digest to 1.25.12.
.travis.yml Updates Travis CI Go version to 1.25.12.
.github/workflows/project-check.yml Updates GO_VERSION env used by Actions to 1.25.12.
.github/workflows/kind-e2e.yml Updates GO_VERSION env used by Actions to 1.25.12.
.github/workflows/backward-compatibility-e2e.yml Updates GO_VERSION env used by Actions to 1.25.12.
.circleci/config.yml Updates CircleCI Go image tag to 1.25.12.

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

Comment thread go.mod Outdated
Comment on lines 3 to 4
go 1.25.12

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Adopted the suggested go 1.25 + toolchain go1.25.12 split in 171e478 for downstream compatibility. One correction though: a full patch version in the go directive (go 1.25.12) is valid since Go 1.21 and does parse fine — go build/vet/test/mod vendor all ran successfully with it. The change is for consumer-version-floor hygiene, not a parsing failure.

@cheyang

cheyang commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/copilot review

@cheyang

cheyang commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@gemini-code-assist /review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the Go version from 1.24.12 to 1.25.12 across the repository, updating CI configurations, Dockerfiles, and the go.mod file. It also updates deprecated reflect.Ptr usages to reflect.Pointer. A critical issue was identified in pkg/utils/testutil/deepequal.go, where comparing a nil pointer with a non-nil pointer can lead to a runtime panic when Elem().Interface() is called. A nil check should be added to prevent this.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +44 to 47
case reflect.Pointer:
if v1.Pointer() == v2.Pointer() {
return true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

If one of the pointers is nil and the other is not, v1.Pointer() == v2.Pointer() will evaluate to false. The function will then proceed to call v1.Elem().Interface(). Since one of the pointers is nil, calling Elem() on it returns an invalid zero Value, and calling Interface() on that invalid value will trigger a runtime panic.

To prevent this, we should check if either pointer is nil after verifying they are not equal, and return false if so.

	case reflect.Pointer:
		if v1.Pointer() == v2.Pointer() {
			return true
		}
		if v1.IsNil() || v2.IsNil() {
			return false
		}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed real latent panic (nil vs non-nil pointer -> Elem().Interface() on an invalid Value). Fixed in 7d728e4 by returning false when either side is nil before dereferencing. Verified with a nil-vs-non-nil case that it now returns false instead of panicking.

@cheyang

cheyang commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/copilot review

@cheyang

cheyang commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@gemini-code-assist /review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the Go version from 1.24.12 to 1.25.12 across the project's CI configurations, Dockerfiles, and the go.mod file. It also updates reflection usage by replacing the deprecated reflect.Ptr with reflect.Pointer in operation_lock.go and deepequal.go, and introduces a nil-pointer guard in deepequal.go to prevent potential panics. There are no review comments to evaluate, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

@@ -1,4 +1,4 @@
FROM golang:1.24.12-bookworm AS builder
FROM golang:1.25.12-bookworm AS builder

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch — pinned in 2ce7f81 to the same golang:1.25.12-bookworm@sha256:a9c020ee3d1508c7be5435c262434e3d3fc1d0e76a11afeb9ddae7d60bc86aa4 digest used by the other builder Dockerfiles, so the e2e emulator build is now reproducible and consistent with the rest of the repo.

Comment thread .circleci/config.yml Outdated
Comment on lines +10 to +12
# cimg/go publishes per-minor tags; use the latest 1.25.x. The exact
# toolchain (>= go.mod's go directive) is auto-selected by Go.
- image: cimg/go:1.25

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Clarified the comment in 2ce7f81. It now spells out that cimg/go:1.25 tracks the newest 1.25 patch, and that go.mod's toolchain go1.25.12 will auto-download the toolchain at build time if the image ships an older 1.25 patch (CircleCI has network access, so this succeeds). In practice cimg/go:1.25 is already >= 1.25.12, so no download happens today; the note just makes the fallback behavior explicit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

case reflect.Slice:
return assert.ElementsMatch(t, v1.Interface(), v2.Interface())
case reflect.Ptr:
case reflect.Pointer:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is incorrect — reflect.Pointer is a valid reflect.Kind constant, added in Go 1.18 as the successor to reflect.Ptr (which is now deprecated in favor of reflect.Pointer). The code compiles fine: go build ./pkg/utils/testutil/... succeeds with go1.25.12. In fact this change came from commit 826f138, which replaced the deprecated reflect.Ptr precisely to silence the deprecation warning — switching back to reflect.Ptr would reintroduce it. Keeping reflect.Pointer as-is.

// Check for typed nil pointer
rObj := reflect.ValueOf(object)
if rObj.Kind() == reflect.Ptr && rObj.IsNil() {
if rObj.Kind() == reflect.Pointer && rObj.IsNil() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same as the other thread — reflect.Pointer is a valid reflect.Kind constant since Go 1.18 (reflect.Ptr is the deprecated alias). go build ./pkg/ddc/base/... compiles cleanly with go1.25.12. This was an intentional deprecated-API cleanup in 826f138, so reflect.Pointer stays.

cheyang and others added 6 commits July 11, 2026 15:02
Go 1.24 reached EOL on 2026-02-11; move to the maintained 1.25.x line.
No dependency changes required — controller-runtime v0.17.5 and k8s.io
v0.29.x only require Go 1.21.

Signed-off-by: cheyang <cheyang.cy@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
golangci-lint v2.12.2 (govet inline analyzer) flags reflect.Ptr, which
carries a //go:fix inline directive as a deprecated alias of
reflect.Pointer. Functionally identical.

Signed-off-by: cheyang <cheyang.cy@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
CircleCI's cimg/go convenience image lags the official Go release and
has no 1.25.12 tag yet, so the pinned image failed to pull. Track the
1.25 minor tag; Go auto-selects a toolchain >= the go.mod go directive.

Signed-off-by: cheyang <cheyang.cy@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
Per review: keep the go directive at the major.minor language floor
(go 1.25) so downstream importers are not forced onto patch 1.25.12,
and pin the exact build toolchain via the toolchain directive.

Signed-off-by: cheyang <cheyang.cy@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
When comparing a nil and a non-nil pointer, Elem().Interface() was
called on a nil pointer, panicking on an invalid reflect.Value. Return
false for the nil-vs-non-nil case instead.

Signed-off-by: cheyang <cheyang.cy@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
…oolchain note

Pin the e2e oss-emulator builder to the same golang:1.25.12-bookworm digest
used by the other Dockerfiles for reproducibility, and update the CircleCI
comment to reflect that go.mod's toolchain go1.25.12 may trigger an
auto-download when the cimg/go:1.25 image ships an older 1.25 patch.

Signed-off-by: cheyang <cheyang@163.com>
@cheyang cheyang force-pushed the update_golang_version branch from ede30c3 to 51ab40e Compare July 11, 2026 07:03
@sonarqubecloud

Copy link
Copy Markdown

@RongGu RongGu 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
/approve

@fluid-e2e-bot fluid-e2e-bot Bot added the lgtm label Jul 11, 2026
@fluid-e2e-bot

fluid-e2e-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RongGu

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

@RongGu RongGu merged commit 9b3c2e2 into fluid-cloudnative:master Jul 11, 2026
23 of 24 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants