Skip to content

Commit

Permalink
Upgrades Envoy 1.11 -> 1.12 and Istio 1.2 -> 1.6
Browse files Browse the repository at this point in the history
This upgrades Envoy from 1.11 -> 1.12 and Istio from 1.2 -> 1.6.

This also fixes race conditions by reading back the admin port in tests
via the "--admin-address-path" flag as implemented in
`envoy.EnableAdminAddressDetection`

This intentionally stops at Istio 1.6 as versions beyond this imply
configuration changes to our test data.

Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Apr 12, 2021
1 parent 32b27df commit b795aa7
Show file tree
Hide file tree
Showing 46 changed files with 2,093 additions and 1,818 deletions.
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ $(GOIMPORTS): $(BINGO_DIR)/goimports.mod
@echo "(re)installing $(GOBIN)/goimports-v0.1.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=goimports.mod -o=$(GOBIN)/goimports-v0.1.0 "golang.org/x/tools/cmd/goimports"

GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.38.0
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.39.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.38.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.38.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.39.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.39.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"

LICENSER := $(GOBIN)/licenser-v0.6.0
$(LICENSER): $(BINGO_DIR)/licenser.mod
Expand Down
2 changes: 1 addition & 1 deletion .bingo/golangci-lint.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/golangci/golangci-lint v1.38.0 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.39.0 // cmd/golangci-lint
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

GOIMPORTS="${GOBIN}/goimports-v0.1.0"

GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.38.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.39.0"

LICENSER="${GOBIN}/licenser-v0.6.0"

Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
runs-on: ${{ matrix.runner.os }}
timeout-minutes: 90 # instead of 360 by default
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
matrix:
runner:
# - os: macos-latest ## revisit once all tests are off ginkgo
- os: macos-latest
- os: ubuntu-latest
steps:
- name: "Checkout"
Expand All @@ -33,16 +34,16 @@ jobs:
- name: "Install Go"
uses: actions/setup-go@v2
with:
go-version: '1.16.2'
go-version: '1.16.3'

- name: "Verify clean check-in"
run: make check

- name: "Run unit tests"
# prefetch implicit version needed by pkg/binary/envoy/controlplane/istio_test.go until #136. This avoids:
# Unable to start Envoy process: fork/exec /home/circleci/.getenvoy/builds/standard/1.11.0/linux_glibc/bin/envoy: text file busy
# Prefetch envoy to avoid latency during "go test" which contributes to timeouts.
# This version must align with pkg/binary/envoytest/util.go
run: |
go run cmd/getenvoy/main.go fetch standard:1.11.0
go run cmd/getenvoy/main.go fetch standard:1.12.7
make test
- name: "Generate test coverage report"
Expand All @@ -67,7 +68,7 @@ jobs:
- name: "Install Go"
uses: actions/setup-go@v2
with:
go-version: '1.16.2'
go-version: '1.16.3'

- name: "Build the `getenvoy` binary"
run: make bin
Expand All @@ -85,6 +86,7 @@ jobs:
runs-on: ${{ matrix.runner.os }}
timeout-minutes: 90 # instead of 360 by default
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
matrix:
runner:
- os: macos-latest
Expand All @@ -105,7 +107,7 @@ jobs:
- name: "Install Go"
uses: actions/setup-go@v2
with:
go-version: '1.16.2'
go-version: '1.16.3'

- name: "Re-use the `getenvoy` binary pre-built by the upstream job"
uses: actions/download-artifact@v2
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: '1.16.2'
go-version: '1.16.3'

- name: "Login into DockerHub"
uses: azure/docker-login@v1
Expand Down Expand Up @@ -79,6 +79,7 @@ jobs:
runs-on: ${{ matrix.runner.os }}
timeout-minutes: 90 # instead of 360 by default
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
matrix:
runner:
- os: macos-latest
Expand All @@ -99,7 +100,7 @@ jobs:
- name: "Install Go"
uses: actions/setup-go@v2
with:
go-version: '1.16.2'
go-version: '1.16.3'

- name: "Get tag name"
run: | # Trim "v" prefix in the release tag
Expand Down
52 changes: 26 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@ run:

linters:
enable:
- "bodyclose"
- "depguard"
- "dupl"
- "goconst"
- "gocritic"
- "gofmt"
- "gocyclo"
- "goimports"
- "golint"
- "gosec"
- "gosimple"
- "lll"
- "misspell"
- "nakedret"
- "prealloc"
- "scopelint"
- "unconvert"
- "unparam"
- "bodyclose"
- "depguard"
- "dupl"
- "goconst"
- "gocritic"
- "gofmt"
- "gocyclo"
- "goimports"
- "golint"
- "gosec"
- "gosimple"
- "lll"
- "misspell"
- "nakedret"
- "prealloc"
- "unconvert"
- "unparam"

disable:
- "gochecknoinits"
- "gochecknoglobals"
- "gochecknoinits"
- "gochecknoglobals"
- "gomoddirectives" # Istio 1.6 dependency conflicts prevent enabling this

# all available settings of specific linters
linters-settings:
Expand All @@ -58,8 +58,8 @@ linters-settings:
# report about shadowed variables
check-shadowing: true
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
Expand Down Expand Up @@ -109,10 +109,10 @@ linters-settings:

# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags: ["performance"]
enabled-tags: [ "performance" ]

settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
paramsOnly: true
rangeValCopy:
sizeThreshold: 32
Expand All @@ -122,7 +122,7 @@ issues:
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude: []
exclude: [ ]

# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
Expand Down
125 changes: 100 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,120 @@ go 1.16
require (
bitbucket.org/creachadair/shell v0.0.6
github.com/Masterminds/semver v1.5.0
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a
github.com/containerd/containerd v1.3.2
github.com/deislabs/oras v0.8.1
github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 // indirect
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect
github.com/andybalholm/brotli v1.0.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68 // indirect
github.com/containerd/containerd v1.4.4
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e // indirect
github.com/deislabs/oras v0.11.1
github.com/docker/distribution v2.7.1+incompatible
github.com/envoyproxy/go-control-plane v0.9.5
github.com/docker/docker v20.10.5+incompatible // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad
github.com/envoyproxy/protoc-gen-validate v0.5.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/golang/protobuf v1.3.5
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/gogo/protobuf v1.3.2
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.3 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.4.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lunixbochs/vtclean v1.0.0 // indirect
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12
github.com/mattn/go-shellwords v1.0.10
github.com/mholt/archiver v3.1.1+incompatible
github.com/mattn/go-runewidth v0.0.12 // indirect
github.com/mattn/go-shellwords v1.0.11
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mholt/archiver/v3 v3.5.0
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.12.1 // indirect
github.com/onsi/gomega v1.10.0 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/gomega v1.10.2 // indirect
github.com/opencontainers/image-spec v1.0.1
github.com/opencontainers/selinux v1.8.0 // indirect
github.com/otiai10/copy v1.2.0
github.com/otiai10/copy v1.5.1
github.com/pierrec/lz4/v4 v4.1.4 // indirect
github.com/pkg/errors v0.9.1
github.com/schollz/progressbar/v2 v2.13.2
github.com/shirou/gopsutil v0.0.0-20190731134726-d80c43f9c984
github.com/prometheus/client_golang v1.10.0 // indirect
github.com/prometheus/common v0.20.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/schollz/progressbar/v3 v3.7.6
github.com/shirou/gopsutil/v3 v3.21.3
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v1.1.3
github.com/stretchr/testify v1.7.0
github.com/tetratelabs/getenvoy-package v0.0.0-20190730071641-da31aed4333e
github.com/tetratelabs/log v0.0.0-20190710134534-eb04d1e84fb8
github.com/tetratelabs/getenvoy-package v0.4.0
github.com/tetratelabs/log v0.0.0-20210323000454-90a3a3e141b5
github.com/tetratelabs/multierror v1.1.0
// Match data/extension/init/templates/tinygo/*/default/go.mod_ See RATIONALE.md for why
github.com/tetratelabs/proxy-wasm-go-sdk v0.1.1
istio.io/api v0.0.0-20200227213531-891bf31f3c32
istio.io/istio v0.0.0-20200304114959-c3c353285578
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72 // indirect
google.golang.org/genproto v0.0.0-20210406143921-e86de6bf7a46 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
honnef.co/go/tools v0.0.1-2020.1.5 // indirect
istio.io/api v0.0.0-20201113182140-d4b7e3fc2b44
istio.io/istio v0.0.0-20201120194348-3ddc57b6d1e1
k8s.io/api v0.20.1 // indirect
k8s.io/apiextensions-apiserver v0.19.3 // indirect
k8s.io/apimachinery v0.20.1 // indirect
k8s.io/client-go v0.20.1 // indirect
k8s.io/klog/v2 v2.4.0 // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
rsc.io/letsencrypt v0.0.3 // indirect
sigs.k8s.io/service-apis v0.1.0-rc2.0.20201112213625-c0375b7fa81f // indirect
)

replace github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.15
// Resolve import problems caused by using istio, currently istio/[email protected]
// See See https://github.com/istio/istio/blob/1.6.14/go.mod and go.sum
replace (
// Needed for import github.com/envoyproxy/go-control-plane/envoy/config/wasm/v2alpha
github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.9.5

replace github.com/docker/docker => github.com/docker/docker v17.12.1-ce+incompatible
// Istio 1.6 used gogo, which conflicted with a lot of other libraries
github.com/golang/protobuf => github.com/golang/protobuf v1.3.5
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20191223191004-3caeed10a8bf
google.golang.org/grpc => google.golang.org/grpc v1.28.1

replace github.com/hashicorp/consul => github.com/hashicorp/consul v1.3.1
// istio/[email protected]
istio.io/istio => istio.io/istio v0.0.0-20201120194348-3ddc57b6d1e1

// Latests patch of k8s version included in istio 1.6
k8s.io/api => k8s.io/api v0.18.17
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.17
k8s.io/apimachinery => k8s.io/apimachinery v0.18.17
k8s.io/client-go => k8s.io/client-go v0.18.17

// Set to the last commit before kube-openapi switched imports from gnostic/OpenAPIv2 -> openapi
// See https://github.com/kubernetes/kube-openapi/issues/209
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20200204173128-addea2498afe

// Needed for import sigs.k8s.io/service-apis/api/v1alpha1
sigs.k8s.io/service-apis => sigs.k8s.io/service-apis v0.0.0-20200227172328-b9010cfacdbe
)

// Handle ambiguous import due istio imports
exclude (
github.com/Azure/go-autorest v10.8.1+incompatible
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/hashicorp/consul v1.3.1
)
Loading

0 comments on commit b795aa7

Please sign in to comment.