Skip to content

Commit

Permalink
Update Go to 1.18
Browse files Browse the repository at this point in the history
Run `go fix ./...` to remove `// +build` tags.

Fix goleak checks in pkg/hubble/container to work with Go 1.18 due to
change in function on top of stack.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser authored and qmonnet committed Mar 28, 2022
1 parent c4be82a commit 1108684
Show file tree
Hide file tree
Showing 440 changed files with 39 additions and 454 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-images-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:latest-race
quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }}-race
build-args: |
BASE_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
BASE_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a
LOCKDEBUG=1
RACE=1
OPERATOR_VARIANT=${{ matrix.name }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
tags: |
quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }}-race
build-args: |
BASE_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
BASE_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a
LOCKDEBUG=1
RACE=1
OPERATOR_VARIANT=${{ matrix.name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-bpf-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@4b0cf6cc4619e737324ddfcec08fff2413359514
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-build-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0

- name: Cache LLVM and Clang
id: cache-llvm
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Checkout code
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Checkout code
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Checkout code
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Checkout code
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: 1.17.8
go-version: 1.18.0
- name: Checkout code
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
with:
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: go
dist: focal
sudo: required

go: "1.17.8"
go: "1.18"

jobs:
include:
Expand All @@ -16,7 +16,7 @@ jobs:
if: type != pull_request
env:
- RACE=1
- BASE_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
- BASE_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a
- LOCKDEBUG=1

# Disabled due to a compilation issue: https://github.com/cilium/cilium/issues/13252
Expand All @@ -25,7 +25,7 @@ jobs:
# if: type != pull_request
# env:
# - RACE=1
# - BASE_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
# - BASE_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a
# - LOCKDEBUG=1
# virt: vm
# group: edge
Expand Down
2 changes: 1 addition & 1 deletion GO_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.8
1.18
2 changes: 1 addition & 1 deletion api/v1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
include ../../Makefile.defs

# Update this via images/scripts/update-cilium-builder-image.sh
CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:cedbb2b3142dd78d26e88a8061aa53c371a22c75@sha256:45f76b4957ed30f84abd1762039235f07bcdbbac063f1550e54c6423b145a75a
CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:ff6f18ae83fe9d80ac00e0204954cc27c73eecd0@sha256:87550fa6d231e660106bf8dd73609675213ff98621b02c2454d5f72125c13afd

.PHONY: proto
proto:
Expand Down
1 change: 0 additions & 1 deletion bugtool/cmd/ethtool_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build linux
// +build linux

package cmd

Expand Down
1 change: 0 additions & 1 deletion bugtool/cmd/ethtool_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !linux
// +build !linux

package cmd

Expand Down
1 change: 0 additions & 1 deletion bugtool/cmd/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion bugtool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
1 change: 0 additions & 1 deletion cilium-health/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
1 change: 0 additions & 1 deletion cilium-health/responder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/bpf_ct_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/bpf_ipcache_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/bpf_metrics_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/bpf_nat_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/encrypt_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build privileged_tests
// +build privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/cmd/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion cilium/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
1 change: 0 additions & 1 deletion clustermesh-apiserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
2 changes: 1 addition & 1 deletion contrib/scripts/check-missing-tags-in-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

files_missing_build_tag="`grep -L -r '// +build' . --include \*_test.go \
files_missing_build_tag="`grep -L -r '//go:build' . --include \*_test.go \
--exclude-dir={.git,_build,vendor,test}`"
if [ -n "$files_missing_build_tag" ]; then
echo "Test file(s) does not contain a tag privileged_tests or !privileged_tests tags:"
Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/debuginfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build linux && privileged_tests
// +build linux,privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/fqdn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/ipcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/kube_proxy_healthz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/nodeport_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build linux && privileged_tests
// +build linux,privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests && integration_tests
// +build !privileged_tests,integration_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build !privileged_tests
// +build !privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/cmd/sysctl_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright Authors of Cilium

//go:build linux && privileged_tests
// +build linux,privileged_tests

package cmd

Expand Down
1 change: 0 additions & 1 deletion daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
1 change: 0 additions & 1 deletion hubble-relay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Ensure build fails on versions of Go that are not supported by Cilium.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17

package main

Expand Down
4 changes: 2 additions & 2 deletions images/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# SPDX-License-Identifier: Apache-2.0

ARG COMPILERS_IMAGE=quay.io/cilium/image-compilers:e847f4176cb42ae27fa459a10df6721c43702b64@sha256:78df068553627c53d8dbe0f61275271b597c55c60585f3ea9f6916bd3cfd611a
ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a
ARG TESTER_IMAGE=quay.io/cilium/image-tester:c37f768323abfba87c90cd9c82d37136183457bc@sha256:4c9d640b6379eb4964b8590acc95ca2dfaa71df70f4467fb7d8ac076acf6a8e1
ARG GOLANG_IMAGE=docker.io/library/golang:1.17.8@sha256:ca709802394f4744685c1ecc083965656c3633799a005e90c75c62cafbaf3cee
ARG GOLANG_IMAGE=docker.io/library/golang:1.18.0@sha256:b5a9ae5907066849cbb2b47af93713b1f030e3eb6b36d84f2ae5f354b25c80d4
ARG CILIUM_LLVM_IMAGE=quay.io/cilium/cilium-llvm:547db7ec9a750b8f888a506709adb41f135b952e@sha256:4d6fa0aede3556c5fb5a9c71bc6b9585475ac9b1064f516d4c45c8fb691c9d9e

FROM ${COMPILERS_IMAGE} as compilers-image
Expand Down
2 changes: 1 addition & 1 deletion images/cilium-docker-plugin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

ARG BASE_IMAGE=scratch
ARG GOLANG_IMAGE=docker.io/library/golang:1.17.8@sha256:ca709802394f4744685c1ecc083965656c3633799a005e90c75c62cafbaf3cee
ARG GOLANG_IMAGE=docker.io/library/golang:1.18.0@sha256:b5a9ae5907066849cbb2b47af93713b1f030e3eb6b36d84f2ae5f354b25c80d4

# BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit.
# Represents the plataform where the build is happening, do not mix with
Expand Down
2 changes: 1 addition & 1 deletion images/cilium-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2020-2021 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:cedbb2b3142dd78d26e88a8061aa53c371a22c75@sha256:45f76b4957ed30f84abd1762039235f07bcdbbac063f1550e54c6423b145a75a
ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:ff6f18ae83fe9d80ac00e0204954cc27c73eecd0@sha256:87550fa6d231e660106bf8dd73609675213ff98621b02c2454d5f72125c13afd
ARG UBUNTU_IMAGE=docker.io/library/ubuntu:20.04@sha256:cf31af331f38d1d7158470e095b132acd126a7180a54f263d386da88eb681d93

FROM ${UBUNTU_IMAGE} as rootfs
Expand Down
4 changes: 2 additions & 2 deletions images/cilium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright 2020-2021 Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:cedbb2b3142dd78d26e88a8061aa53c371a22c75@sha256:45f76b4957ed30f84abd1762039235f07bcdbbac063f1550e54c6423b145a75a
ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:0da282e47af1907e17a1aa8dba3d41de6879ef62@sha256:9359be20d242518ffcaab23ec3dfbff7ffc3bd383e845963323e0420fa4b462b
ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:ff6f18ae83fe9d80ac00e0204954cc27c73eecd0@sha256:87550fa6d231e660106bf8dd73609675213ff98621b02c2454d5f72125c13afd
ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:efb92c208c5f1f190243b361cbb43413ca49d534@sha256:8ca66f05327b5affad2bfb09614636f2b0d3fa24a9f40d1b5f86c2ef9ca2e46a

# cilium-envoy from github.com/cilium/proxy
#
Expand Down
2 changes: 1 addition & 1 deletion images/clustermesh-apiserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

ARG BASE_IMAGE=scratch
ARG GOLANG_IMAGE=docker.io/library/golang:1.17.8@sha256:ca709802394f4744685c1ecc083965656c3633799a005e90c75c62cafbaf3cee
ARG GOLANG_IMAGE=docker.io/library/golang:1.18.0@sha256:b5a9ae5907066849cbb2b47af93713b1f030e3eb6b36d84f2ae5f354b25c80d4
ARG ALPINE_IMAGE=docker.io/library/alpine:3.12.7@sha256:36553b10a4947067b9fbb7d532951066293a68eae893beba1d9235f7d11a20ad

# BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit.
Expand Down
Loading

0 comments on commit 1108684

Please sign in to comment.