diff --git a/.circleci/config.yml b/.circleci/config.yml index cbca9f8f..431eefdd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,10 +6,15 @@ orbs: parameters: # See "Runtime platform versions" in CONTRIBUTING.md # We define go-release-version here as a pipeline parameter not because we intend to - # override it in any parameterized builds, but just as a convenient shareable constant + # override it in any parameterized builds, but just as a convenient shareable constant. go-release-version: type: string - default: "1.19.4" + default: "1.20.1" + + # In addition to the most recent version of Go, we also support the previous version. + go-previous-version: + type: string + default: "1.19.6" # We use a remote Docker host in some CI jobs that need to run Docker containers. # As of 2022-04-15, the default Docker daemon version was 17.09.0-ce, which started @@ -31,26 +36,25 @@ workflows: workflow: jobs: - go-test: - name: Go 1.19 - docker-image: cimg/go:1.19 + name: Go <> + docker-image: cimg/go:<> run-lint: true test-coverage: true - go-test: - name: Go 1.18 - docker-image: cimg/go:1.18 + name: Go <> + docker-image: cimg/go:<> - benchmarks: - docker-image: cimg/go:1.19 + docker-image: cimg/go:<> - integration-test - docker-images-test - # Run hourly integration tests on the private v6 branch hourly-integration-test-stg: triggers: - schedule: cron: "0 * * * *" filters: branches: - only: v6 + only: v7 jobs: - integration-test when: @@ -61,7 +65,7 @@ workflows: cron: "0 * * * *" filters: branches: - only: v6 + only: v7 jobs: - integration-test: ld_api_url: https://app.launchdarkly.com @@ -78,14 +82,14 @@ workflows: cron: "0 8 * * *" filters: branches: - only: v6 + only: v7 jobs: - package-build-test: - name: package build - Go 1.19 - docker-image: cimg/go:1.19 + name: package build - Go <> + docker-image: cimg/go:<> - package-build-test: - name: package build - Go 1.18 - docker-image: cimg/go:1.18 + name: package build - Go <> + docker-image: cimg/go:<> daily-security-scan: triggers: @@ -93,7 +97,7 @@ workflows: cron: "0 12 * * *" filters: branches: - only: v6 + only: v7 jobs: - security-scan-of-current-build - security-scan-of-published-image @@ -222,10 +226,8 @@ jobs: parameters: docker-image: type: string - docker: - image: <> - steps: - run: go version - run: go install github.com/launchdarkly/ld-relay/v7@latest diff --git a/.golangci.yml b/.golangci.yml index 5aa46927..902851af 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,7 +7,6 @@ run: linters: enable: - bodyclose - - deadcode - depguard - dupl - errcheck @@ -36,7 +35,6 @@ linters: - unconvert - unparam - unused - - varcheck - whitespace fast: false diff --git a/.ldrelease/config.yml b/.ldrelease/config.yml index f8708259..ba1a0d6b 100644 --- a/.ldrelease/config.yml +++ b/.ldrelease/config.yml @@ -38,7 +38,7 @@ repo: jobs: - docker: - image: cimg/go:1.19.4 # See "Runtime platform versions" in CONTRIBUTING.md + image: cimg/go:1.20.1 # See "Runtime platform versions" in CONTRIBUTING.md copyGitHistory: true template: name: go diff --git a/Dockerfile b/Dockerfile index 8f4149d9..7e8d72fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # This is a standalone Dockerfile that does not depend on goreleaser building the binary # It is NOT the version that is pushed to dockerhub -FROM golang:1.19.4-alpine3.16 as builder +FROM golang:1.20.1-alpine3.16 as builder # See "Runtime platform versions" in CONTRIBUTING.md RUN apk --no-cache add \ diff --git a/Makefile b/Makefile index 8c7b6c79..dac8c985 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -GOLANGCI_LINT_VERSION=v1.48.0 +GOLANGCI_LINT_VERSION=v1.51.2 LINTER=./bin/golangci-lint LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION) diff --git a/internal/bigsegments/sync.go b/internal/bigsegments/sync.go index 1e3b01c5..940f5389 100644 --- a/internal/bigsegments/sync.go +++ b/internal/bigsegments/sync.go @@ -323,7 +323,7 @@ func (s *defaultBigSegmentSynchronizer) poll() (bool, segmentChangesSummary, err if err != nil { return false, segmentChangesSummary{}, err } - defer response.Body.Close() //nolint:errcheck + defer response.Body.Close() //nolint:errcheck,gosec if response.StatusCode != 200 { return false, segmentChangesSummary{}, &httpStatusError{response.StatusCode} diff --git a/internal/sharedtest/listener.go b/internal/sharedtest/listener.go index b67efe62..716b36ca 100644 --- a/internal/sharedtest/listener.go +++ b/internal/sharedtest/listener.go @@ -13,7 +13,7 @@ import ( // and the port number, and then closes the listener. func WithListenerForAnyPort(t *testing.T, fn func(net.Listener, int)) { l, port := startListenerForAnyAvailablePort(t) - defer l.Close() //nolint:errcheck + defer l.Close() //nolint:errcheck,gosec fn(l, port) } diff --git a/scripts/verify-release-versions.sh b/scripts/verify-release-versions.sh index 36e1e331..4800be2e 100755 --- a/scripts/verify-release-versions.sh +++ b/scripts/verify-release-versions.sh @@ -21,7 +21,7 @@ function fail_for_file() { exit 1 } -LDRELEASE_GO_VERSION=$(sed <${ldrelease_config_file} -n 's#.*image: *cimg/go:\([1-9.]*\).*#\1#p') +LDRELEASE_GO_VERSION=$(sed <${ldrelease_config_file} -n 's#.*image: *cimg/go:\([0-9.]*\).*#\1#p') if [ -z "${LDRELEASE_GO_VERSION}" ]; then fail_for_file Go ${ldrelease_config_file} fi