Skip to content

Commit

Permalink
fix: add job link to race test notifications (#16018)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt authored Jan 22, 2025
1 parent 7ba8f9a commit a05a947
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ jobs:
permissions:
id-token: write
contents: read
actions: read
steps:
- name: Checkout the repo
uses: actions/[email protected]
Expand Down Expand Up @@ -288,7 +289,14 @@ jobs:
- name: Print Races
id: print-races
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.should-run-ci-core == 'true' }}
env:
GH_REPO: ${{ github.repository }}
GH_RUN_ID: ${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
run_url=$(gh run --repo "$GH_REPO" view "$GH_RUN_ID" --json jobs --jq '.jobs[] | select(.name | contains("${{ matrix.type.cmd }}")) | .url')
echo "run_url=$run_url" >> $GITHUB_OUTPUT
find race.* | xargs cat > race.txt
if [[ -s race.txt ]]; then
cat race.txt
Expand Down Expand Up @@ -329,7 +337,8 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
with:
channel-id: "#topic-data-races"
slack-message: "Race tests failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}"
slack-message: |
Race Tests Failed: ${{ steps.print-races.outputs.run_url }}
core-scripts-tests:
name: test-scripts
Expand Down

0 comments on commit a05a947

Please sign in to comment.