Skip to content

Commit

Permalink
fix: add job link to race test notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Jan 21, 2025
1 parent 7b836d8 commit 781e7d3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ jobs:
run: |
find . -type f,d -exec touch -r {} -d '1970-01-01T00:00:01' {} \; || true
- name: Debug Run Url
run: |
gh version
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
- name: Setup NodeJS
if: ${{ needs.filter.outputs.should-run-ci-core == 'true' }}
uses: ./.github/actions/setup-nodejs
Expand Down Expand Up @@ -288,7 +294,13 @@ 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 }}
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 +341,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 781e7d3

Please sign in to comment.