Browse Source

[NET-4895] ci - api tests and consul container tests error because of dependency bugs with go 1.20.6. Pin go to 1.20.5. (#18124)

### Description
The following jobs started failing when go 1.20.6 was released:
- `go-test-api-1-19`
- `go-test-api-1-20`
- `compatibility-integration-tests`
- `upgrade-integration-tests`

`compatibility-integration-tests` and `compatibility-integration-tests`
to this testcontainers issue:
https://github.com/testcontainers/testcontainers-go/issues/1359. This
issue calls for testcontainers to release a new version when one of
their dependencies is fixed. When that is done, we will unpin the go
versions in `compatibility-integration-tests` and
`compatibility-integration-tests`.

### Testing & Reproduction steps

See these jobs broken in CI and then see them work with this PR.

---------

Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
pull/18134/head
John Murret 1 year ago committed by GitHub
parent
commit
a2c6953d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .github/workflows/go-tests.yml
  2. 10
      .github/workflows/reusable-unit.yml
  3. 12
      .github/workflows/test-integrations.yml

8
.github/workflows/go-tests.yml

@ -376,6 +376,7 @@ jobs:
runs-on: ${{ needs.setup.outputs.compute-xl }} runs-on: ${{ needs.setup.outputs.compute-xl }}
repository-name: ${{ github.repository }} repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}" go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.19.10"
permissions: permissions:
id-token: write # NOTE: this permission is explicitly required for Vault auth. id-token: write # NOTE: this permission is explicitly required for Vault auth.
contents: read contents: read
@ -394,6 +395,12 @@ jobs:
runs-on: ${{ needs.setup.outputs.compute-xl }} runs-on: ${{ needs.setup.outputs.compute-xl }}
repository-name: ${{ github.repository }} repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}" go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
# pinning this to 1.20.5 because this issue in go-testcontainers occurs
# in 1.20.6 with the error "http: invalid Host header, host port waiting failed"
# https://github.com/testcontainers/testcontainers-go/issues/1359
# remove setting this when the above issue is fixed so that the reusable
# job will just get the go version from go.mod.
go-version: "1.20.5"
permissions: permissions:
id-token: write # NOTE: this permission is explicitly required for Vault auth. id-token: write # NOTE: this permission is explicitly required for Vault auth.
contents: read contents: read
@ -412,6 +419,7 @@ jobs:
runs-on: ${{ needs.setup.outputs.compute-xl }} runs-on: ${{ needs.setup.outputs.compute-xl }}
repository-name: ${{ github.repository }} repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}" go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.19"
permissions: permissions:
id-token: write # NOTE: this permission is explicitly required for Vault auth. id-token: write # NOTE: this permission is explicitly required for Vault auth.
contents: read contents: read

10
.github/workflows/reusable-unit.yml

@ -33,6 +33,10 @@ on:
required: false required: false
type: string type: string
default: "" default: ""
go-version:
required: false
type: string
default: ""
secrets: secrets:
elevated-github-token: elevated-github-token:
required: true required: true
@ -59,6 +63,12 @@ jobs:
if: ${{ endsWith(inputs.repository-name, '-enterprise') }} if: ${{ endsWith(inputs.repository-name, '-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
if: ${{ inputs.go-version != '' }}
with:
go-version: ${{ inputs.go-version }}
cache: true
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
if: ${{ inputs.go-version == '' }}
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
cache: true cache: true

12
.github/workflows/test-integrations.yml

@ -372,7 +372,11 @@ jobs:
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' # pinning this to 1.20.5 because this issue in go-testcontainers occurs
# in 1.20.6 with the error "http: invalid Host header, host port waiting failed"
# https://github.com/testcontainers/testcontainers-go/issues/1359
# go-version-file: 'go.mod'
go-version: '1.20.5'
- run: go env - run: go env
- name: docker env - name: docker env
run: | run: |
@ -487,7 +491,11 @@ jobs:
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' # pinning this to 1.20.5 because this issue in go-testcontainers occurs
# in 1.20.6 with the error "http: invalid Host header, host port waiting failed"
# https://github.com/testcontainers/testcontainers-go/issues/1359
# go-version-file: 'go.mod'
go-version: '1.20.5'
- run: go env - run: go env
# Get go binary from workspace # Get go binary from workspace

Loading…
Cancel
Save