Skip to content

Commit

Permalink
backport of commit 9816a74
Browse files Browse the repository at this point in the history
  • Loading branch information
zalimeni committed Jan 16, 2024
1 parent b8b8ad4 commit 86407d0
Show file tree
Hide file tree
Showing 1,752 changed files with 28,906 additions and 111,125 deletions.
4 changes: 0 additions & 4 deletions .changelog/18329.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/19218.txt

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions .changelog/19311.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/19499.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/19879.txt

This file was deleted.

2 changes: 1 addition & 1 deletion .changelog/19940.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:improvement
connect: Replace usage of deprecated Envoy fields `envoy.config.cluster.v3.Cluster.http2_protocol_options` and `envoy.config.bootstrap.v3.Admin.access_log_path`.
xds: remove usages of deprecated Envoy fields: `envoy.config.cluster.v3.Cluster.http2_protocol_options`, `envoy.config.bootstrap.v3.Admin.access_log_path`
```
3 changes: 0 additions & 3 deletions .changelog/19992.txt

This file was deleted.

2 changes: 1 addition & 1 deletion .changelog/20010.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:improvement
connect: Replace usage of deprecated Envoy field `envoy.config.cluster.v3.Cluster.http_protocol_options`.
xds: Replace usage of deprecated Envoy field `envoy.config.cluster.v3.Cluster.http_protocol_options`
```
2 changes: 1 addition & 1 deletion .changelog/20011.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:improvement
connect: Replace usage of deprecated Envoy field `envoy.config.router.v3.WeightedCluster.total_weight`.
connect: replace usage of deprecated Envoy field `envoy.config.router.v3.WeightedCluster.total_weight`.
```
2 changes: 1 addition & 1 deletion .changelog/20012.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:improvement
connect: Replace usage of deprecated Envoy field `envoy.extensions.filters.http.lua.v3.Lua.inline_code`.
xds: replace usage of deprecated Envoy field `envoy.extensions.filters.http.lua.v3.Lua.inline_code`
```
3 changes: 0 additions & 3 deletions .changelog/20013.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/20023.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/20078.txt

This file was deleted.

29 changes: 29 additions & 0 deletions .github/scripts/notify_slack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

set -uo pipefail

# This script is used in GitHub Actions pipelines to notify Slack of a job failure.

if [[ $GITHUB_REF_NAME == "main" ]]; then
GITHUB_ENDPOINT="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
GITHUB_ACTIONS_ENDPOINT="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
COMMIT_MESSAGE=$(git log -1 --pretty=%B | head -n1)
SHORT_REF=$(git rev-parse --short "${GITHUB_SHA}")
curl -X POST -H 'Content-type: application/json' \
--data \
"{ \
\"attachments\": [ \
{ \
\"fallback\": \"GitHub Actions workflow failed!\", \
\"text\": \"❌ Failed: \`${GITHUB_ACTOR}\`'s <${GITHUB_ACTIONS_ENDPOINT}|${GITHUB_JOB}> job failed for commit <${GITHUB_ENDPOINT}|${SHORT_REF}> on \`${GITHUB_REF_NAME}\`!\n\n- <${COMMIT_MESSAGE}\", \
\"footer\": \"${GITHUB_REPOSITORY}\", \
\"ts\": \"$(date +%s)\", \
\"color\": \"danger\" \
} \
] \
}" "${FEED_CONSUL_GH_URL}"
else
echo "Not posting slack failure notifications for non-main branch"
fi
10 changes: 1 addition & 9 deletions .github/scripts/set_test_package_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
set -euo pipefail
export RUNNER_COUNT=$1

if ((RUNNER_COUNT < 2 ))
then
echo ERROR: RUNNER_COUNT must be greater than 1. Otherwise use the non-split unit test cod in .github/workflows/reusable-unit.yml.
exit 1 # terminate and indicate error
else
EFFECTIVE_RUNNER_COUNT=$((RUNNER_COUNT-1))
fi

# set matrix var to list of unique packages containing tests
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | select(.ImportPath != "github.com/hashicorp/consul/agent") | .ImportPath' | shuf | jq --slurp --compact-output '.' | jq --argjson runnercount $EFFECTIVE_RUNNER_COUNT -cM '[_nwise(length / $runnercount | ceil)]' | jq --compact-output '. += [["github.com/hashicorp/consul/agent"]]'))"
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | shuf | jq --slurp --compact-output '.' | jq --argjson runnercount $RUNNER_COUNT -cM '[_nwise(length / $runnercount | floor)]'))"

echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
2 changes: 1 addition & 1 deletion .github/workflows/backport-assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- name: Run Backport Assistant for release branches
run: |
backport-assistant backport -merge-method=squash
backport-assistant backport -merge-method=squash -gh-automerge
env:
BACKPORT_LABEL_REGEXP: "backport/(?P<target>\\d+\\.\\d+)"
BACKPORT_TARGET_TEMPLATE: "release/{{.target}}.x"
Expand Down
44 changes: 2 additions & 42 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,55 +72,14 @@ jobs:

ember-build-test:
needs: setup
if: ${{ !endsWith(github.repository, '-enterprise') }}
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
strategy:
matrix:
partition: [1, 2, 3, 4]
env:
EMBER_TEST_REPORT: test-results/report-ce.xml # outputs test report for CI test summary
EMBER_TEST_PARALLEL: true # enables test parallelization with ember-exam
CONSUL_NSPACES_ENABLED: 0 # NOTE: this should be 1 in ENT.
JOBS: 2 # limit parallelism for broccoli-babel-transpiler
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: '18'

- name: Install Yarn
run: corepack enable

- name: Install Chrome
uses: browser-actions/setup-chrome@c485fa3bab6be59dce18dbc18ef6ab7cbc8ff5f1 # v1.2.0

- name: Install dependencies
working-directory: ui
run: make deps

- name: Build CI
working-directory: ui/packages/consul-ui
run: make build-ci

- name: Ember exam
working-directory: ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=4 --partition=${{ matrix.partition }} --path dist --silent -r xunit

- name: Test Coverage CI
working-directory: ui/packages/consul-ui
run: make test-coverage-ci

ember-build-test-ent:
needs: setup
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
strategy:
matrix:
partition: [1, 2, 3, 4]
env:
EMBER_TEST_REPORT: test-results/report-ce.xml # outputs test report for CI test summary
EMBER_TEST_PARALLEL: true # enables test parallelization with ember-exam
CONSUL_NSPACES_ENABLED: 1 # NOTE: this should be 1 in ENT.
CONSUL_NSPACES_ENABLED: ${{ endsWith(github.repository, '-enterprise') && 1 || 0 }} # NOTE: this should be 1 in ENT.
JOBS: 2 # limit parallelism for broccoli-babel-transpiler
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down Expand Up @@ -150,6 +109,7 @@ jobs:
- name: Test Coverage CI
working-directory: ui/packages/consul-ui
run: make test-coverage-ci

# This is job is required for branch protection as a required gihub check
# because GitHub actions show up as checks at the job level and not the
# workflow level. This is currently a feature request:
Expand Down
Loading

0 comments on commit 86407d0

Please sign in to comment.