Skip to content

Commit 4698ec0

Browse files
authored
chore: upgrade to Go 1.25.0 (GoogleContainerTools#9859)
* chore: upgrade to Go 1.24.6 * chore: upgrade to Go 1.25.0 * fix: remove @ GOEXPERIMENT=nocoverageredesign env var * fix: fix getHandleFromProcess error * testing to see what type handle is * testing to see what type handle is * fix Windows handle panic
1 parent 8ee8726 commit 4698ec0

File tree

9 files changed

+14
-10
lines changed

9 files changed

+14
-10
lines changed

.github/workflows/integration-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Go
3636
uses: actions/setup-go@v5
3737
with:
38-
go-version: 1.24.2
38+
go-version: 1.25.0
3939
id: go
4040

4141
- name: Set up Java

.github/workflows/linters-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.24.2
20+
go-version: 1.25.0
2121
id: go
2222

2323
- name: Check out code into the Go module directory

.github/workflows/unit-tests-darwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.24.2
26+
go-version: 1.25.0
2727
id: go
2828

2929
# Retrieve build locations with `go env`

.github/workflows/unit-tests-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: 1.24.2
20+
go-version: 1.25.0
2121
id: go
2222

2323
- name: Check out code into the Go module directory

.github/workflows/unit-tests-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@v5
2626
with:
27-
go-version: 1.24.2
27+
go-version: 1.25.0
2828
id: go
2929

3030
# Retrieve build locations with `go env`

.github/workflows/verify-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.24.2
26+
go-version: 1.25.0
2727
id: go
2828

2929
# Skip changes not affecting examples or integration/examples

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ unit-tests: $(BUILD_DIR)
122122
.PHONY: coverage
123123
coverage: $(BUILD_DIR)
124124
# https://go-review.git.corp.google.com/c/go/+/569575
125-
@ GOEXPERIMENT=nocoverageredesign ./hack/gotest.sh -count=1 -race -cover -short -timeout=90s -coverprofile=out/coverage.txt -coverpkg="./pkg/...,./cmd/..." $(SKAFFOLD_TEST_PACKAGES)
125+
@ ./hack/gotest.sh -count=1 -race -cover -short -timeout=90s -coverprofile=out/coverage.txt -coverpkg="./pkg/...,./cmd/..." $(SKAFFOLD_TEST_PACKAGES)
126126
@- curl -s https://codecov.io/bash > $(BUILD_DIR)/upload_coverage && bash $(BUILD_DIR)/upload_coverage
127127

128128
.PHONY: checks

deploy/skaffold/Dockerfile.deps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,5 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
163163
jq \
164164
apt-transport-https && \
165165
rm -rf /var/lib/apt/lists/*
166-
COPY --from=golang:1.24.2 /usr/local/go /usr/local/go
166+
COPY --from=golang:1.25.0 /usr/local/go /usr/local/go
167167
ENV PATH /usr/local/go/bin:/root/go/bin:$PATH

pkg/skaffold/kubectl/exec_windows.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ func (c *Cmd) Start() error {
8383
}
8484

8585
func getHandleFromProcess(p *os.Process) (windows.Handle, error) {
86-
// `os.Process` don't expose `handle uintptr` field.
86+
// os.Process contains an unexported processHandle struct, which contains
87+
// a `handle uintptr` field.
8788
v := reflect.ValueOf(p)
8889
i := reflect.Indirect(v)
8990

@@ -96,8 +97,11 @@ func getHandleFromProcess(p *os.Process) (windows.Handle, error) {
9697
if f.IsZero() {
9798
return windows.InvalidHandle, fmt.Errorf("could not get 'handle' field from os.Process. probably a bug")
9899
}
100+
// Get the processHandle struct
101+
handlestruct := reflect.Indirect(f)
102+
handle := handlestruct.FieldByName("handle")
99103

100-
return windows.Handle(f.Uint()), nil
104+
return windows.Handle(handle.Uint()), nil
101105
}
102106

103107
// Run starts the specified command in a job object and waits for it to complete

0 commit comments

Comments
 (0)