Skip to content

Commit

Permalink
Merge pull request moby#46982 from thaJeztah/update_go_1.22
Browse files Browse the repository at this point in the history
update to go1.22.6
  • Loading branch information
thaJeztah authored Sep 2, 2024
2 parents 0473cfa + f5108e9 commit 6acf013
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
default: "graphdriver"

env:
GO_VERSION: "1.21.13"
GO_VERSION: "1.22.6"
GOTESTLIST_VERSION: v0.3.1
TESTSTAT_VERSION: v0.1.25
ITG_CLI_MATRIX_SIZE: 6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
default: false

env:
GO_VERSION: "1.21.13"
GO_VERSION: "1.22.6"
GOTESTLIST_VERSION: v0.3.1
TESTSTAT_VERSION: v0.1.25
WINDOWS_BASE_IMAGE: mcr.microsoft.com/windows/servercore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
pull_request:

env:
GO_VERSION: "1.21.13"
GO_VERSION: "1.22.6"
DESTDIR: ./build
SETUP_BUILDX_VERSION: latest
SETUP_BUILDKIT_IMAGE: moby/buildkit:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
pull_request:

env:
GO_VERSION: "1.21.13"
GO_VERSION: "1.22.6"
GIT_PAGER: "cat"
PAGER: "cat"
SETUP_BUILDX_VERSION: latest
Expand Down
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ linters-settings:

govet:
check-shadowing: false

gosec:
excludes:
- G115 # FIXME temporarily suppress 'G115: integer overflow conversion': it produces many hits, some of which may be false positives, and need to be looked at; see https://github.com/moby/moby/issues/48358

depguard:
rules:
main:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.7

ARG GO_VERSION=1.21.13
ARG GO_VERSION=1.22.6
ARG BASE_DEBIAN_DISTRO="bookworm"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
ARG XX_VERSION=1.5.0
Expand Down Expand Up @@ -229,7 +229,7 @@ FROM binary-dummy AS containerd-windows
FROM containerd-${TARGETOS} AS containerd

FROM base AS golangci_lint
ARG GOLANGCI_LINT_VERSION=v1.59.1
ARG GOLANGCI_LINT_VERSION=v1.60.2
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
GOBIN=/build/ GO111MODULE=on go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}" \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.simple
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# This represents the bare minimum required to build and test Docker.

ARG GO_VERSION=1.21.13
ARG GO_VERSION=1.22.6

ARG BASE_DEBIAN_DISTRO="bookworm"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG}
# Use PowerShell as the default shell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ARG GO_VERSION=1.21.13
ARG GO_VERSION=1.22.6
ARG GOTESTSUM_VERSION=v1.8.2
ARG GOWINRES_VERSION=v0.3.1
ARG CONTAINERD_VERSION=v1.7.21
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/generate-files.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.21.13
ARG GO_VERSION=1.22.6
ARG BASE_DEBIAN_DISTRO="bookworm"
ARG PROTOC_VERSION=3.11.4

Expand Down
12 changes: 12 additions & 0 deletions hack/make/.binary
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ source "${MAKEDIR}/.go-autogen"
GCFLAGS="all=-N -l"
fi

if [ "$(go env GOARCH)" = "arm" ] && [ "$(go env GOARM)" = "5" ]; then
# cross-compiling for arm/v5 fails on go1.22; a fix is included for this
# in go1.23 (https://github.com/golang/go/issues/65290), but for go1.22
# we can set the correct option manually.
CGO_CFLAGS+=" -Wno-atomic-alignment"
export CGO_CFLAGS

# Make sure libatomic is included on arm/v5, because clang does not auto-link it.
# see https://github.com/moby/moby/pull/46982#issuecomment-2206992611
export CGO_LDFLAGS="-latomic"
fi

echo "Building $([ "$DOCKER_STATIC" = "1" ] && echo "static" || echo "dynamic") $DEST/$BINARY_FULLNAME ($PLATFORM_NAME)..."
if [ -n "$DOCKER_DEBUG" ]; then
set -x
Expand Down

0 comments on commit 6acf013

Please sign in to comment.