Skip to content

Commit

Permalink
backport of commit 7d8764d
Browse files Browse the repository at this point in the history
  • Loading branch information
hashi-derek committed Dec 8, 2023
1 parent d93f7f7 commit 1fd8641
Show file tree
Hide file tree
Showing 1,244 changed files with 16,312 additions and 88,972 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: 3 additions & 0 deletions .changelog/19860.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
connect: Solves an issue where two upstream services with the same name in different namespaces were not getting routed to correctly by API Gateways.
```
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
8 changes: 1 addition & 7 deletions .github/scripts/set_test_package_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
set -euo pipefail
export RUNNER_COUNT=$1

if ((RUNNER_COUNT < 1 ))
then
echo ERROR: RUNNER_COUNT must be greater than zero.
exit 1 # terminate and indicate error
fi

# set matrix var to list of unique packages containing tests
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 | ceil)]'))"
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
Loading

0 comments on commit 1fd8641

Please sign in to comment.