Pin lint-consul-retry to v1.3.0 (#19777)

The latest version finds more issues which are fixed on main and not being backported.
This commit is contained in:
Matt Keeler 2023-11-29 16:37:51 -05:00 committed by GitHub
parent 5507e9d798
commit 8b3f1dcbdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 144 additions and 139 deletions

View File

@ -4,12 +4,12 @@ on:
pull_request: pull_request:
branches-ignore: branches-ignore:
- stable-website - stable-website
- 'docs/**' - "docs/**"
- 'ui/**' - "ui/**"
- 'mktg-**' # Digital Team Terraform-generated branches' prefix - "mktg-**" # Digital Team Terraform-generated branches' prefix
- 'backport/docs/**' - "backport/docs/**"
- 'backport/ui/**' - "backport/ui/**"
- 'backport/mktg-**' - "backport/mktg-**"
push: push:
branches: branches:
# Push events on the main branch # Push events on the main branch
@ -31,14 +31,14 @@ concurrency:
jobs: jobs:
conditional-skip: conditional-skip:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Get files changed and conditionally skip CI name: Get files changed and conditionally skip CI
outputs: outputs:
skip-ci: ${{ steps.read-files.outputs.skip-ci }} skip-ci: ${{ steps.read-files.outputs.skip-ci }}
steps: steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get changed files - name: Get changed files
id: read-files id: read-files
run: ./.github/scripts/filter_changed_files_go_test.sh run: ./.github/scripts/filter_changed_files_go_test.sh
@ -54,14 +54,14 @@ jobs:
compute-large: ${{ steps.setup-outputs.outputs.compute-large }} compute-large: ${{ steps.setup-outputs.outputs.compute-large }}
compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }} compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- id: setup-outputs - id: setup-outputs
name: Setup outputs name: Setup outputs
run: ./.github/scripts/get_runner_classes.sh run: ./.github/scripts/get_runner_classes.sh
check-go-mod: check-go-mod:
needs: needs:
- setup - setup
uses: ./.github/workflows/reusable-check-go-mod.yml uses: ./.github/workflows/reusable-check-go-mod.yml
with: with:
runs-on: ${{ needs.setup.outputs.compute-small }} runs-on: ${{ needs.setup.outputs.compute-small }}
@ -71,111 +71,111 @@ jobs:
check-generated-protobuf: check-generated-protobuf:
needs: needs:
- setup - setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git - name: Setup Git
if: ${{ endsWith(github.repository, '-enterprise') }} if: ${{ endsWith(github.repository, '-enterprise') }}
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
- run: make proto-tools - run: make proto-tools
name: Install protobuf name: Install protobuf
- run: make proto-format - run: make proto-format
name: "Protobuf Format" name: "Protobuf Format"
- run: make --always-make proto - run: make --always-make proto
- run: | - run: |
if ! git diff --exit-code; then if ! git diff --exit-code; then
echo "Generated code was not updated correctly" echo "Generated code was not updated correctly"
exit 1 exit 1
fi fi
- run: make proto-lint - run: make proto-lint
name: "Protobuf Lint" name: "Protobuf Lint"
- name: Notify Slack - name: Notify Slack
if: ${{ failure() }} if: ${{ failure() }}
run: .github/scripts/notify_slack.sh run: .github/scripts/notify_slack.sh
check-generated-deep-copy: check-generated-deep-copy:
needs: needs:
- setup - setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git - name: Setup Git
if: ${{ endsWith(github.repository, '-enterprise') }} if: ${{ endsWith(github.repository, '-enterprise') }}
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
- run: make --always-make deep-copy - run: make --always-make deep-copy
- run: | - run: |
if ! git diff --exit-code; then if ! git diff --exit-code; then
echo "Generated code was not updated correctly" echo "Generated code was not updated correctly"
exit 1 exit 1
fi fi
- name: Notify Slack - name: Notify Slack
if: ${{ failure() }} if: ${{ failure() }}
run: .github/scripts/notify_slack.sh run: .github/scripts/notify_slack.sh
lint-enums: lint-enums:
needs: needs:
- setup - setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git - name: Setup Git
if: ${{ endsWith(github.repository, '-enterprise') }} if: ${{ endsWith(github.repository, '-enterprise') }}
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./... - run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./...
- name: Notify Slack - name: Notify Slack
if: ${{ failure() }} if: ${{ failure() }}
run: .github/scripts/notify_slack.sh run: .github/scripts/notify_slack.sh
lint-container-test-deps: lint-container-test-deps:
needs: needs:
- setup - setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git - name: Setup Git
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
- run: make lint-container-test-deps - run: make lint-container-test-deps
- name: Notify Slack - name: Notify Slack
if: ${{ failure() }} if: ${{ failure() }}
run: .github/scripts/notify_slack.sh run: .github/scripts/notify_slack.sh
lint-consul-retry: lint-consul-retry:
needs: needs:
- setup - setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
steps: steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. # NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git - name: Setup Git
if: ${{ endsWith(github.repository, '-enterprise') }} if: ${{ endsWith(github.repository, '-enterprise') }}
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with: with:
go-version-file: 'go.mod' go-version-file: "go.mod"
- run: go install github.com/hashicorp/lint-consul-retry@master && lint-consul-retry - run: go install github.com/hashicorp/lint-consul-retry@v1.3.0 && lint-consul-retry
- name: Notify Slack - name: Notify Slack
if: ${{ failure() }} if: ${{ failure() }}
run: .github/scripts/notify_slack.sh run: .github/scripts/notify_slack.sh
lint: lint:
needs: needs:
- setup - setup
uses: ./.github/workflows/reusable-lint.yml uses: ./.github/workflows/reusable-lint.yml
with: with:
runs-on: ${{ needs.setup.outputs.compute-large }} runs-on: ${{ needs.setup.outputs.compute-large }}
@ -185,7 +185,7 @@ jobs:
lint-32bit: lint-32bit:
needs: needs:
- setup - setup
uses: ./.github/workflows/reusable-lint.yml uses: ./.github/workflows/reusable-lint.yml
with: with:
go-arch: "386" go-arch: "386"
@ -197,7 +197,7 @@ jobs:
# create a development build # create a development build
dev-build: dev-build:
needs: needs:
- setup - setup
uses: ./.github/workflows/reusable-dev-build.yml uses: ./.github/workflows/reusable-dev-build.yml
with: with:
runs-on: ${{ needs.setup.outputs.compute-large }} runs-on: ${{ needs.setup.outputs.compute-large }}
@ -253,8 +253,8 @@ jobs:
go-test-ce: go-test-ce:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit-split.yml uses: ./.github/workflows/reusable-unit-split.yml
with: with:
directory: . directory: .
@ -273,8 +273,8 @@ jobs:
go-test-enterprise: go-test-enterprise:
if: ${{ endsWith(github.repository, '-enterprise') }} if: ${{ endsWith(github.repository, '-enterprise') }}
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit-split.yml uses: ./.github/workflows/reusable-unit-split.yml
with: with:
directory: . directory: .
@ -292,8 +292,8 @@ jobs:
go-test-race: go-test-race:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: . directory: .
@ -312,8 +312,8 @@ jobs:
go-test-32bit: go-test-32bit:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: . directory: .
@ -353,8 +353,8 @@ jobs:
go-test-envoyextensions: go-test-envoyextensions:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: envoyextensions directory: envoyextensions
@ -371,8 +371,8 @@ jobs:
go-test-troubleshoot: go-test-troubleshoot:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: troubleshoot directory: troubleshoot
@ -389,8 +389,8 @@ jobs:
go-test-api-1-19: go-test-api-1-19:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: api directory: api
@ -408,8 +408,8 @@ jobs:
go-test-api-1-20: go-test-api-1-20:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: api directory: api
@ -427,8 +427,8 @@ jobs:
go-test-sdk-1-19: go-test-sdk-1-19:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: sdk directory: sdk
@ -446,8 +446,8 @@ jobs:
go-test-sdk-1-20: go-test-sdk-1-20:
needs: needs:
- setup - setup
- dev-build - dev-build
uses: ./.github/workflows/reusable-unit.yml uses: ./.github/workflows/reusable-unit.yml
with: with:
directory: sdk directory: sdk
@ -484,27 +484,27 @@ jobs:
go-tests-success: go-tests-success:
needs: needs:
- conditional-skip - conditional-skip
- setup - setup
- check-generated-deep-copy - check-generated-deep-copy
- check-generated-protobuf - check-generated-protobuf
- check-go-mod - check-go-mod
- lint-consul-retry - lint-consul-retry
- lint-container-test-deps - lint-container-test-deps
- lint-enums - lint-enums
- lint - lint
- lint-32bit - lint-32bit
# - go-test-arm64 # - go-test-arm64
- go-test-enterprise - go-test-enterprise
- go-test-ce - go-test-ce
- go-test-race - go-test-race
- go-test-envoyextensions - go-test-envoyextensions
- go-test-troubleshoot - go-test-troubleshoot
- go-test-api-1-19 - go-test-api-1-19
- go-test-api-1-20 - go-test-api-1-20
- go-test-sdk-1-19 - go-test-sdk-1-19
- go-test-sdk-1-20 - go-test-sdk-1-20
- go-test-32bit - go-test-32bit
# - go-test-s390x # - go-test-s390x
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
if: always() && needs.conditional-skip.outputs.skip-ci != 'true' if: always() && needs.conditional-skip.outputs.skip-ci != 'true'

View File

@ -18,6 +18,7 @@ MOG_VERSION='v0.4.0'
PROTOC_GO_INJECT_TAG_VERSION='v1.3.0' PROTOC_GO_INJECT_TAG_VERSION='v1.3.0'
PROTOC_GEN_GO_BINARY_VERSION="v0.1.0" PROTOC_GEN_GO_BINARY_VERSION="v0.1.0"
DEEP_COPY_VERSION='bc3f5aa5735d8a54961580a3a24422c308c831c2' DEEP_COPY_VERSION='bc3f5aa5735d8a54961580a3a24422c308c831c2'
LINT_CONSUL_RETRY_VERSION='v1.3.0'
MOCKED_PB_DIRS= pbdns MOCKED_PB_DIRS= pbdns

View File

@ -130,12 +130,16 @@ function proto_tools_install {
} }
function lint_install { function lint_install {
local lint_consul_retry_version
lint_consul_retry_version="$(make --no-print-directory print-LINT_CONSUL_RETRY_VERSION)"
local golangci_lint_version local golangci_lint_version
golangci_lint_version="$(make --no-print-directory print-GOLANGCI_LINT_VERSION)" golangci_lint_version="$(make --no-print-directory print-GOLANGCI_LINT_VERSION)"
install_unversioned_tool \ install_versioned_tool \
'lint-consul-retry' \ 'lint-consul-retry' \
'github.com/hashicorp/lint-consul-retry@master' 'github.com/hashicorp/lint-consul-retry' \
"${lint_consul_retry_version}" \
'github.com/hashicorp/lint-consul-retry'
install_unversioned_tool \ install_unversioned_tool \
'enumcover' \ 'enumcover' \