diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b2cc0e6d..cc7147563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 id: go - name: Check out code into the Go module directory @@ -45,7 +45,7 @@ jobs: - name: Lint run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 make lint - name: Test diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c9f501241..bf37e27d3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: - name: Install go version uses: actions/setup-go@v3 with: - go-version: '^1.18' + go-version: '^1.19' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f21f176d5..4682abf01 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: ^1.18 + go-version: ^1.19 - run: | pip install -r docs/scripts/requirements.txt diff --git a/.golangci.yml b/.golangci.yml index ccbcb74d2..637999b50 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,8 +3,6 @@ linters-settings: default-signifies-exhaustive: false goimports: local-prefixes: sigs.k8s.io/external-dns - golint: - min-confidence: 0.9 maligned: suggest-new: true misspell: @@ -15,24 +13,17 @@ linters: # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint disable-all: true enable: - - deadcode - depguard - dogsled - gofmt - goimports - goprintffuncname - - gosimple - govet - ineffassign - misspell - rowserrcheck - - staticcheck - - structcheck - - stylecheck - typecheck - unconvert - - unused - - varcheck - whitespace issues: diff --git a/Dockerfile b/Dockerfile index f7a0bd197..7f50b66c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # builder image ARG ARCH -FROM golang:1.18 as builder +FROM golang:1.19 as builder ARG ARCH WORKDIR /sigs.k8s.io/external-dns diff --git a/Dockerfile.mini b/Dockerfile.mini index 8e9bf6958..90cba37d9 100644 --- a/Dockerfile.mini +++ b/Dockerfile.mini @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.18 as builder +FROM golang:1.19 as builder WORKDIR /sigs.k8s.io/external-dns diff --git a/Makefile b/Makefile index a806ae360..286be63a8 100644 --- a/Makefile +++ b/Makefile @@ -104,8 +104,8 @@ build.push/multiarch: for arch in $(ARCHS); do \ image="$(IMAGE):$(VERSION)-$${arch}" ;\ # pre-pull due to https://github.com/kubernetes-sigs/cluster-addons/pull/84/files ;\ - docker pull $${arch}/alpine:3.14 ;\ - docker pull golang:1.18 ;\ + docker pull $${arch}/alpine:3.15 ;\ + docker pull golang:1.19 ;\ DOCKER_BUILDKIT=1 docker build --rm --tag $${image} --build-arg VERSION="$(VERSION)" --build-arg ARCH="$${arch}" . ;\ docker push $${image} ;\ arch_specific_tags+=( "--amend $${image}" ) ;\ diff --git a/docs/contributing/getting-started.md b/docs/contributing/getting-started.md index 77c64b8e1..4187e39a4 100644 --- a/docs/contributing/getting-started.md +++ b/docs/contributing/getting-started.md @@ -1,7 +1,7 @@ # Quick Start - [Git](https://git-scm.com/downloads) -- [Go 1.18+](https://golang.org/dl/) +- [Go 1.19+](https://golang.org/dl/) - [Go modules](https://github.com/golang/go/wiki/Modules) - [golangci-lint](https://github.com/golangci/golangci-lint) - [Docker](https://docs.docker.com/install/) diff --git a/go.mod b/go.mod index 334b20d4e..f670123cb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/external-dns -go 1.18 +go 1.19 require ( cloud.google.com/go/compute v1.9.0 diff --git a/internal/testutils/endpoint.go b/internal/testutils/endpoint.go index 7e8bf4d10..033b2e03d 100644 --- a/internal/testutils/endpoint.go +++ b/internal/testutils/endpoint.go @@ -42,6 +42,13 @@ func (b byAllFields) Less(i, j int) bool { if b[i].DNSName == b[j].DNSName { // This rather bad, we need a more complex comparison for Targets, which considers all elements if b[i].Targets.Same(b[j].Targets) { + if b[i].RecordType == (b[j].RecordType) { + sa := b[i].ProviderSpecific + sb := b[j].ProviderSpecific + sort.Sort(byNames(sa)) + sort.Sort(byNames(sb)) + return reflect.DeepEqual(sa, sb) + } return b[i].RecordType <= b[j].RecordType } return b[i].Targets.String() <= b[j].Targets.String()