Skip to content

Commit bce1812

Browse files
authored
ci: send Slack notifications on CI failures (#2911)
* try notify Slack on failure * separate job * try slim * extend change to all workflows * simplify * refinement * fix * one blank line
1 parent 36c6f6a commit bce1812

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+340
-323
lines changed

.github/actions/send_failure/action.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/CI_license_compliance.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- cron: "0 0 * * *" # every day at midnight
1212

1313
env:
14-
CORE_DATADOG_API_KEY: ${{ secrets.CORE_DATADOG_API_KEY }}
1514
PYTHON_VERSION: "3.10"
1615
EXCLUDE_PACKAGES: "(?i)^(azure-identity|fastembed|ragas|tqdm|psycopg|mistralai|pgvector).*"
1716

@@ -90,11 +89,8 @@ jobs:
9089
if: ${{ always() }}
9190
run: echo "${{ steps.license_check_report.outputs.report }}"
9291

93-
- name: Send event to Datadog for nightly failures
92+
- name: Notify Slack on nightly failure
9493
if: failure() && github.event_name == 'schedule'
95-
uses: ./.github/actions/send_failure
94+
uses: deepset-ai/notify-slack-action@v1
9695
with:
97-
title: |
98-
Core integrations license compliance nightly failure: ${{ github.workflow }}
99-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
100-
96+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/aimlapi.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ jobs:
7171
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
7272
hatch run test:cov-retry
7373
74-
- name: Send event to Datadog for nightly failures
75-
if: failure() && github.event_name == 'schedule'
76-
uses: ./.github/actions/send_failure
74+
notify-slack-on-failure:
75+
needs: run
76+
if: failure() && github.event_name == 'schedule'
77+
runs-on: ubuntu-slim
78+
steps:
79+
- uses: deepset-ai/notify-slack-action@v1
7780
with:
78-
title: |
79-
Core integrations nightly tests failure: ${{ github.workflow }}
80-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
81+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/amazon_bedrock.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ jobs:
9292
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
9393
hatch run test:unit
9494
95-
- name: Send event to Datadog for nightly failures
96-
if: failure() && github.event_name == 'schedule'
97-
uses: ./.github/actions/send_failure
95+
notify-slack-on-failure:
96+
needs: run
97+
if: failure() && github.event_name == 'schedule'
98+
runs-on: ubuntu-slim
99+
steps:
100+
- uses: deepset-ai/notify-slack-action@v1
98101
with:
99-
title: |
100-
Core integrations nightly tests failure: ${{ github.workflow }}
101-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
102+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/amazon_sagemaker.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ jobs:
6969
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
7070
hatch run test:unit
7171
72-
- name: Send event to Datadog for nightly failures
73-
if: failure() && github.event_name == 'schedule'
74-
uses: ./.github/actions/send_failure
72+
notify-slack-on-failure:
73+
needs: run
74+
if: failure() && github.event_name == 'schedule'
75+
runs-on: ubuntu-slim
76+
steps:
77+
- uses: deepset-ai/notify-slack-action@v1
7578
with:
76-
title: |
77-
Core integrations nightly tests failure: ${{ github.workflow }}
78-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
79+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/anthropic.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ jobs:
7070
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
7171
hatch run test:unit
7272
73-
- name: Send event to Datadog for nightly failures
74-
if: failure() && github.event_name == 'schedule'
75-
uses: ./.github/actions/send_failure
73+
notify-slack-on-failure:
74+
needs: run
75+
if: failure() && github.event_name == 'schedule'
76+
runs-on: ubuntu-slim
77+
steps:
78+
- uses: deepset-ai/notify-slack-action@v1
7679
with:
77-
title: |
78-
Core integrations nightly tests failure: ${{ github.workflow }}
79-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
80+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/arcadedb.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ jobs:
7575
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
7676
hatch run test:unit
7777
78-
- name: Send event to Datadog for nightly failures
79-
if: failure() && github.event_name == 'schedule'
80-
uses: ./.github/actions/send_failure
78+
notify-slack-on-failure:
79+
needs: run
80+
if: failure() && github.event_name == 'schedule'
81+
runs-on: ubuntu-slim
82+
steps:
83+
- uses: deepset-ai/notify-slack-action@v1
8184
with:
82-
title: |
83-
Core integrations nightly tests failure: ${{ github.workflow }}
84-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
85+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/astra.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ jobs:
7373
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
7474
hatch run test:unit
7575
76-
- name: Send event to Datadog for nightly failures
77-
if: failure() && github.event_name == 'schedule'
78-
uses: ./.github/actions/send_failure
76+
notify-slack-on-failure:
77+
needs: run
78+
if: failure() && github.event_name == 'schedule'
79+
runs-on: ubuntu-slim
80+
steps:
81+
- uses: deepset-ai/notify-slack-action@v1
7982
with:
80-
title: |
81-
Core integrations nightly tests failure: ${{ github.workflow }}
82-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
83+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/azure_ai_search.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ jobs:
6767
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
6868
hatch run test:unit
6969
70-
- name: Send event to Datadog for nightly failures
71-
if: failure() && github.event_name == 'schedule'
72-
uses: ./.github/actions/send_failure
70+
notify-slack-on-failure:
71+
needs: run
72+
if: failure() && github.event_name == 'schedule'
73+
runs-on: ubuntu-slim
74+
steps:
75+
- uses: deepset-ai/notify-slack-action@v1
7376
with:
74-
title: |
75-
Core integrations nightly tests failure: ${{ github.workflow }}
76-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
77+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

.github/workflows/azure_doc_intelligence.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ jobs:
6767
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
6868
hatch run test:unit
6969
70-
- name: Send event to Datadog for nightly failures
71-
if: failure() && github.event_name == 'schedule'
72-
uses: ./.github/actions/send_failure
70+
notify-slack-on-failure:
71+
needs: run
72+
if: failure() && github.event_name == 'schedule'
73+
runs-on: ubuntu-slim
74+
steps:
75+
- uses: deepset-ai/notify-slack-action@v1
7376
with:
74-
title: |
75-
Core integrations nightly tests failure: ${{ github.workflow }}
76-
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
77+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

0 commit comments

Comments
 (0)