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

Bump Go to v1.23.2 #5155

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM $BUILDIMAGE
ARG TARGETARCH
RUN set -ex; \
# Need to use the gold linker on ARM, Go really wants to have it.
# https://github.com/golang/go/blob/go1.22.4/src/cmd/link/internal/ld/lib.go#L1622-L1641
# https://github.com/golang/go/blob/go1.23.2/src/cmd/link/internal/ld/lib.go##L1661-L1680
case "$TARGETARCH" in \
arm*) binutils=binutils-gold ;; \
*) binutils=binutils ;; \
Expand Down
2 changes: 1 addition & 1 deletion embedded-bins/Makefile.variables
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
alpine_version = 3.20
alpine_patch_version = $(alpine_version).1
golang_buildimage=docker.io/library/golang:$(go_version)-alpine$(alpine_version)
go_version = 1.22.8
go_version = 1.23.2

runc_version = 1.1.15
runc_buildimage = $(golang_buildimage)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/k0sproject/k0s

go 1.22.0
go 1.23

// k0s
require (
Expand Down
2 changes: 1 addition & 1 deletion hack/tool/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tool

go 1.22.0
go 1.23

require (
github.com/hashicorp/terraform-exec v0.21.0
Expand Down
7 changes: 0 additions & 7 deletions internal/http/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ func Download(ctx context.Context, url string, target io.Writer, options ...Down
// Execute the request.
resp, err := client.Do(req.WithContext(ctx))
if err != nil {
if cause := context.Cause(ctx); cause != nil && !errors.Is(err, cause) {
err = fmt.Errorf("%w (%w)", cause, err)
}
return fmt.Errorf("request failed: %w", err)
}
defer func() {
Expand Down Expand Up @@ -111,10 +108,6 @@ func Download(ctx context.Context, url string, target io.Writer, options ...Down

// Run the actual data transfer.
if _, err := io.Copy(io.MultiWriter(writeMonitor, target), resp.Body); err != nil {
if cause := context.Cause(ctx); cause != nil && !errors.Is(err, cause) {
err = fmt.Errorf("%w (%w)", cause, err)
}

return fmt.Errorf("while downloading: %w", err)
}

Expand Down
4 changes: 1 addition & 3 deletions internal/http/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ func TestDownload_CancelRequest(t *testing.T) {
cancel(assert.AnError)

err := internalhttp.Download(ctx, "http://404.example.com", io.Discard)
assert.ErrorIs(t, err, assert.AnError)
if urlErr := (*url.Error)(nil); assert.ErrorAs(t, err, &urlErr) {
assert.Equal(t, "Get", urlErr.Op)
assert.Equal(t, "http://404.example.com", urlErr.URL)
assert.Equal(t, context.Canceled, urlErr.Err)
assert.Equal(t, assert.AnError, urlErr.Err)
}
}

Expand Down Expand Up @@ -113,7 +112,6 @@ func TestDownload_CancelDownload(t *testing.T) {

assert.ErrorContains(t, err, "while downloading: ")
assert.ErrorIs(t, err, assert.AnError)
assert.ErrorIs(t, err, context.Canceled)
}

func TestDownload_RedirectLoop(t *testing.T) {
Expand Down
Loading