Skip to content

Commit 00724be

Browse files
authored
Merge pull request google#3474 from bobbypage/bump-golang-122
Bump golang to 1.22
2 parents 51d8705 + e04a4ea commit 00724be

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test:
55
strategy:
66
matrix:
7-
go-versions: ['1.20', '1.19']
7+
go-versions: ['1.22', '1.21']
88
platform: [ubuntu-20.04]
99
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh]
1010
runs-on: ${{ matrix.platform }}
@@ -14,6 +14,7 @@ jobs:
1414
uses: actions/setup-go@v5
1515
with:
1616
go-version: ${{ matrix.go-versions }}
17+
check-latest: true
1718
- name: Checkout code
1819
uses: actions/checkout@v4
1920
- name: Run presubmit checks
@@ -30,7 +31,7 @@ jobs:
3031
test-integration:
3132
strategy:
3233
matrix:
33-
go-versions: ['1.20', '1.19']
34+
go-versions: ['1.22', '1.21']
3435
platform: [ubuntu-20.04]
3536
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh]
3637
runs-on: ${{ matrix.platform }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
GO := go
16-
GOLANGCI_VER := v1.54.1
16+
GOLANGCI_VER := v1.56.2
1717
GO_TEST ?= $(GO) test $(or $(GO_FLAGS),-race)
1818
arch ?= $(shell go env GOARCH)
1919

@@ -72,7 +72,7 @@ docker-%:
7272
@docker build -t cadvisor:$(shell git rev-parse --short HEAD) -f deploy/Dockerfile .
7373

7474
docker-build:
75-
@docker run --rm -w /go/src/github.com/google/cadvisor -v ${PWD}:/go/src/github.com/google/cadvisor golang:1.20 make build
75+
@docker run --rm -w /go/src/github.com/google/cadvisor -v ${PWD}:/go/src/github.com/google/cadvisor golang:1.22 make build
7676

7777
presubmit: lint
7878
@echo ">> checking go mod tidy"

build/integration-in-docker.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ function run_tests() {
3636
env GOOS=linux GOFLAGS='$GO_FLAGS' go test -c github.com/google/cadvisor/integration/tests/healthz"
3737

3838
if [ "$BUILD_PACKAGES" != "" ]; then
39-
BUILD_CMD="echo 'deb http://deb.debian.org/debian buster-backports main'>/etc/apt/sources.list.d/buster.list && \
40-
apt update && \
41-
apt install -y -t buster-backports $BUILD_PACKAGES && \
39+
BUILD_CMD="apt update && apt install -y $BUILD_PACKAGES && \
4240
$BUILD_CMD"
4341
fi
4442
docker run --rm \
4543
-w /go/src/github.com/google/cadvisor \
4644
-v ${PWD}:/go/src/github.com/google/cadvisor \
47-
golang:"$GOLANG_VERSION-buster" \
45+
golang:"$GOLANG_VERSION-bullseye" \
4846
bash -c "$BUILD_CMD"
4947

5048
EXTRA_DOCKER_OPTS="-e DOCKER_IN_DOCKER_ENABLED=true"
@@ -61,7 +59,8 @@ function run_tests() {
6159
--cap-add="sys_admin" \
6260
--entrypoint="" \
6361
gcr.io/k8s-testimages/bootstrap \
64-
bash -c "echo 'deb http://deb.debian.org/debian buster-backports main'>/etc/apt/sources.list.d/buster.list && \
62+
bash -c "export DEBIAN_FRONTEND=noninteractive && \
63+
echo 'deb http://deb.debian.org/debian buster-backports main'>/etc/apt/sources.list.d/buster.list && \
6564
cat /etc/apt/sources.list.d/buster.list && \
6665
apt update && \
6766
apt install -y -t buster-backports $PACKAGES && \
@@ -72,5 +71,5 @@ GO_FLAGS=${GO_FLAGS:-"-tags=netgo -race"}
7271
PACKAGES=${PACKAGES:-"sudo"}
7372
BUILD_PACKAGES=${BUILD_PACKAGES:-}
7473
CADVISOR_ARGS=${CADVISOR_ARGS:-}
75-
GOLANG_VERSION=${GOLANG_VERSION:-"1.20"}
74+
GOLANG_VERSION=${GOLANG_VERSION:-"1.22"}
7675
run_tests "$GO_FLAGS" "$PACKAGES" "$BUILD_PACKAGES" "$CADVISOR_ARGS"

build/unit-in-container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ function run_tests() {
4040

4141
GO_FLAGS=${GO_FLAGS:-"-tags=netgo -race"}
4242
BUILD_PACKAGES=${BUILD_PACKAGES:-}
43-
GOLANG_VERSION=${GOLANG_VERSION:-"1.20"}
43+
GOLANG_VERSION=${GOLANG_VERSION:-"1.22"}
4444
run_tests

deploy/canary/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20
1+
FROM golang:1.22
22
33

44
RUN apt-get update && apt-get install -y git dmsetup && apt-get clean

0 commit comments

Comments
 (0)