Skip to content

Commit

Permalink
Merge branch 'NET-1594' of ssh://github.com/hashicorp/consul into NET…
Browse files Browse the repository at this point in the history
…-1594
  • Loading branch information
absolutelightning committed Aug 31, 2023
2 parents a581843 + 070a87a commit 8d07a0d
Show file tree
Hide file tree
Showing 32 changed files with 884 additions and 215 deletions.
4 changes: 4 additions & 0 deletions .changelog/18617.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:improvement
log: Currently consul logs files like this consul-{timestamp}.log. This change makes sure that there is always
consul.log file with the latest logs in it.
```
30 changes: 15 additions & 15 deletions .github/scripts/get_runner_classes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
set -euo pipefail

case "$GITHUB_REPOSITORY" in
*-enterprise)
# shellcheck disable=SC2129
echo "compute-small=['self-hosted', 'linux', 'small']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'linux', 'medium']" >> "$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'linux', 'large']" >> "$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
;;
*)
# shellcheck disable=SC2129
echo "compute-small=['custom-linux-s-consul-latest']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['custom-linux-m-consul-latest']" >> "$GITHUB_OUTPUT"
echo "compute-large=['custom-linux-l-consul-latest']" >> "$GITHUB_OUTPUT"
echo "compute-xl=['custom-linux-xl-consul-latest']" >> "$GITHUB_OUTPUT"
;;
*-enterprise)
# shellcheck disable=SC2129
echo "compute-small=['self-hosted', 'linux', 'small']" >>"$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'linux', 'medium']" >>"$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'linux', 'large']" >>"$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m6a.2xlarge']" >>"$GITHUB_OUTPUT"
;;
*)
# shellcheck disable=SC2129
echo "compute-small=['custom-linux-s-consul-latest']" >>"$GITHUB_OUTPUT"
echo "compute-medium=['custom-linux-m-consul-latest']" >>"$GITHUB_OUTPUT"
echo "compute-large=['custom-linux-l-consul-latest']" >>"$GITHUB_OUTPUT"
echo "compute-xl=['custom-linux-xl-consul-latest']" >>"$GITHUB_OUTPUT"
;;
esac
30 changes: 15 additions & 15 deletions .github/scripts/get_runner_classes_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
set -euo pipefail

case "$GITHUB_REPOSITORY" in
*-enterprise)
# shellcheck disable=SC2129
echo "compute-small=['self-hosted', 'windows', 'small']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'windows', 'medium']" >> "$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'windows', 'large']" >> "$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'windows', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
;;
*)
# shellcheck disable=SC2129
echo "compute-small=['windows-2019']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['windows-2019']" >> "$GITHUB_OUTPUT"
echo "compute-large=['windows-2019']" >> "$GITHUB_OUTPUT"
echo "compute-xl=['windows-2019']" >> "$GITHUB_OUTPUT"
;;
*-enterprise)
# shellcheck disable=SC2129
echo "compute-small=['self-hosted', 'windows', 'small']" >>"$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'windows', 'medium']" >>"$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'windows', 'large']" >>"$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'windows', 'type=m6a.2xlarge']" >>"$GITHUB_OUTPUT"
;;
*)
# shellcheck disable=SC2129
echo "compute-small=['windows-2019']" >>"$GITHUB_OUTPUT"
echo "compute-medium=['windows-2019']" >>"$GITHUB_OUTPUT"
echo "compute-large=['windows-2019']" >>"$GITHUB_OUTPUT"
echo "compute-xl=['windows-2019']" >>"$GITHUB_OUTPUT"
;;
esac
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

ember-build-test:
needs: setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
strategy:
matrix:
partition: [1, 2, 3, 4]
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
- setup
uses: ./.github/workflows/reusable-lint.yml
with:
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
Expand All @@ -189,7 +189,7 @@ jobs:
uses: ./.github/workflows/reusable-lint.yml
with:
go-arch: "386"
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
Expand All @@ -200,7 +200,7 @@ jobs:
- setup
uses: ./.github/workflows/reusable-dev-build.yml
with:
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
Expand All @@ -212,7 +212,7 @@ jobs:
# uses: ./.github/workflows/reusable-dev-build.yml
# with:
# uploaded-binary-name: 'consul-bin-s390x'
# runs-on: ${{ needs.setup.outputs.compute-xl }}
# runs-on: ${{ needs.setup.outputs.compute-large }}
# go-arch: "s390x"
# repository-name: ${{ github.repository }}
# secrets:
Expand All @@ -226,7 +226,7 @@ jobs:
# uses: ./.github/workflows/reusable-dev-build.yml
# with:
# uploaded-binary-name: 'consul-bin-arm64'
# runs-on: ${{ needs.setup.outputs.compute-xl }}
# runs-on: ${{ needs.setup.outputs.compute-large }}
# go-arch: "arm64"
# repository-name: ${{ github.repository }}
# secrets:
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
with:
directory: .
runner-count: 12
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: ""
permissions:
Expand All @@ -279,7 +279,7 @@ jobs:
with:
directory: .
runner-count: 12
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
permissions:
Expand All @@ -299,7 +299,7 @@ jobs:
directory: .
go-test-flags: 'GO_TEST_FLAGS="-race -gcflags=all=-d=checkptr=0"'
package-names-command: "go list ./... | grep -E -v '^github.com/hashicorp/consul/agent(/consul|/local|/routine-leak-checker)?$' | grep -E -v '^github.com/hashicorp/consul(/command|/connect|/snapshot)'"
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
permissions:
Expand All @@ -319,7 +319,7 @@ jobs:
directory: .
go-arch: "386"
go-test-flags: 'export GO_TEST_FLAGS="-short"'
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
permissions:
Expand All @@ -340,7 +340,7 @@ jobs:
# uploaded-binary-name: 'consul-bin-s390x'
# directory: .
# go-test-flags: 'export GO_TEST_FLAGS="-short"'
# runs-on: ${{ needs.setup.outputs.compute-xl }}
# runs-on: ${{ needs.setup.outputs.compute-large }}
# repository-name: ${{ github.repository }}
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
# permissions:
Expand All @@ -358,7 +358,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: envoyextensions
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
permissions:
Expand All @@ -376,7 +376,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: troubleshoot
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
permissions:
Expand All @@ -394,7 +394,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: api
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.19"
Expand All @@ -413,7 +413,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: api
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.20"
Expand All @@ -432,7 +432,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: sdk
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.19"
Expand All @@ -451,7 +451,7 @@ jobs:
uses: ./.github/workflows/reusable-unit.yml
with:
directory: sdk
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
go-version: "1.20"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test-integrations-1.15.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
} >> "$GITHUB_OUTPUT"
envoy-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
needs:
- setup
- generate-envoy-job-matrices
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml

upgrade-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
needs:
- setup
- dev-build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test-integrations-1.16.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
} >> "$GITHUB_OUTPUT"
envoy-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
needs:
- setup
- generate-envoy-job-matrices
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml

upgrade-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
needs:
- setup
- dev-build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly-test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
needs: [setup]
uses: ./.github/workflows/reusable-dev-build.yml
with:
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
uploaded-binary-name: 'consul-bin'
secrets:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
} >> "$GITHUB_OUTPUT"
envoy-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
needs:
- setup
- generate-envoy-job-matrices
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml

upgrade-integration-test:
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
needs:
- setup
- dev-build
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-integrations-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
# * is a special character in YAML so you have to quote this string
# Run nightly at 12AM UTC/8PM EST/5PM PST.
- cron: '0 0 * * *'
workflow_dispatch:

env:
TEST_RESULTS_DIR: /tmp/test-results
Expand Down Expand Up @@ -38,7 +39,7 @@ jobs:
dev-build:
uses: ./.github/workflows/reusable-dev-build-windows.yml
with:
runs-on: ${{ needs.setup.outputs.compute-xl }}
runs-on: ${{ needs.setup.outputs.compute-large }}
repository-name: ${{ github.repository }}
uploaded-binary-name: 'consul.exe'
secrets:
Expand Down Expand Up @@ -1206,4 +1207,4 @@ jobs:
if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure|cancelled)\"'; then
printf "Tests failed or workflow cancelled:\n\n${{ toJSON(needs) }}"
exit 1
fi
fi
Loading

0 comments on commit 8d07a0d

Please sign in to comment.