ci: send Slack notifications on CI failures#2911
Conversation
|
Nvidia tests failing due to #2838 (unrelated to this PR) |
bogdankostic
left a comment
There was a problem hiding this comment.
Looking good in principle, just wondering why we use a different pattern in CI_license_compliance.yml.
| - name: Notify Slack on nightly failure | ||
| if: failure() && github.event_name == 'schedule' | ||
| uses: ./.github/actions/send_failure | ||
| uses: deepset-ai/notify-slack-action@v1 | ||
| with: | ||
| title: | | ||
| Core integrations license compliance nightly failure: ${{ github.workflow }} | ||
| api-key: ${{ secrets.CORE_DATADOG_API_KEY }} | ||
|
No newline at end of file |
||
| slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} No newline at end of file |
There was a problem hiding this comment.
In all other workflow files we have the notification step as a separate job.
There was a problem hiding this comment.
Yes, in other workflows, we are using a separate job for this reason
to make sure we get a single notification when a matrix workflow fails (not one for each element in the matrix), I created a new lightweight job (uses ubuntu-slim)
In this case, we don't need a matrix: the license check only needs to run on a single operating system and with one Python version. Where possible, it's better to have a step instead of a job because GitHub does not need to spin up a new container.
Related Issues
Proposed Changes:
Instead of sending DD events for CI failures and then Slack notifications from DD monitors, skip DD
To make this work, before opening this PR, I completed the setup described in the Slack documentation.
How did you test it?
In this PR, I temporarily made Anthropic workflow fail and got the expected notification.
Since this was a test, I avoided tagging people. The actual action would tag
@herein the Slack channel.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.