From 77fa8c90e2faf4352b3f849b8d06bc7e05aa06a7 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 14:47:03 +0100 Subject: [PATCH 01/13] try to notify slack on CI failures --- .github/workflows/license_compliance.yml | 68 ++++++++++++------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index b36f9dc4c6..30f2e06f89 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -10,7 +10,7 @@ on: schedule: - cron: "0 0 * * *" # every day at midnight env: - CORE_DATADOG_API_KEY: ${{ secrets.CORE_DATADOG_API_KEY }} + SLACK_WEBHOOK_URL_NOTIFICATIONS: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} PYTHON_VERSION: "3.10" jobs: @@ -57,37 +57,39 @@ jobs: if: ${{ always() }} run: echo "${{ steps.license_check_report.outputs.report }}" - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi + # TODO: Remove this step after testing Slack notifications + - name: Force failure for testing + run: exit 1 - - name: Send event to Datadog - # This step would fail when running in PRs opened from forks since - # secrets are not accessible. - # To prevent showing bogus failures in those PRs we skip the step. - # The workflow will fail in any case if the actual check fails in the previous steps. - if: (success() || failure()) && env.CORE_DATADOG_API_KEY != '' - uses: masci/datadog@v1 + - name: Notify Slack on failure + # Skip on fork PRs where secrets are not accessible + if: failure() && env.SLACK_WEBHOOK_URL_NOTIFICATIONS != '' + uses: slackapi/slack-github-action@v2 with: - api-key: ${{ env.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.job }} in ${{ github.workflow }} workflow" - text: "License compliance check: direct dependencies only." - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + webhook: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} + webhook-type: incoming-webhook + payload: | + text: "${{ github.workflow }} / ${{ github.job }} failed on ${{ github.ref_name }}" + blocks: + - type: "header" + text: + type: "plain_text" + text: "HaystackCI Failure" + - type: "section" + fields: + - type: "mrkdwn" + text: "*Workflow:*\n${{ github.workflow }}" + - type: "mrkdwn" + text: "*Job:*\n${{ github.job }}" + - type: "mrkdwn" + text: "*Branch:*\n`${{ github.ref_name }}`" + - type: "mrkdwn" + text: "*Author:*\n${{ github.actor }}" + - type: "actions" + elements: + - type: "button" + text: + type: "plain_text" + text: "View Run" + url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + style: "danger" From 78a6db24723430b3e823d547d967d9aa5c734f8d Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 14:55:25 +0100 Subject: [PATCH 02/13] improve --- .github/workflows/license_compliance.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index 30f2e06f89..950f43ec0e 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -74,9 +74,11 @@ jobs: - type: "header" text: type: "plain_text" - text: "HaystackCI Failure" + text: "License Compliance Failure" - type: "section" fields: + - type: "mrkdwn" + text: "*Project:*\n${{ github.repository }}" - type: "mrkdwn" text: "*Workflow:*\n${{ github.workflow }}" - type: "mrkdwn" @@ -85,11 +87,5 @@ jobs: text: "*Branch:*\n`${{ github.ref_name }}`" - type: "mrkdwn" text: "*Author:*\n${{ github.actor }}" - - type: "actions" - elements: - - type: "button" - text: - type: "plain_text" - text: "View Run" - url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - style: "danger" + - type: "mrkdwn" + text: "*Run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>" From 51cb103fdf7cbc39115d00c62a3ef2c7947cb3ba Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 16:31:49 +0100 Subject: [PATCH 03/13] simplify --- .github/workflows/license_compliance.yml | 30 +++++++----------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index 950f43ec0e..1a09f026b8 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -23,6 +23,10 @@ jobs: - name: Checkout the code uses: actions/checkout@v6 + # TODO: Remove this step after testing Slack notifications + - name: Force failure for testing + run: exit 1 + - name: Setup Python uses: actions/setup-python@v6 with: @@ -57,10 +61,6 @@ jobs: if: ${{ always() }} run: echo "${{ steps.license_check_report.outputs.report }}" - # TODO: Remove this step after testing Slack notifications - - name: Force failure for testing - run: exit 1 - - name: Notify Slack on failure # Skip on fork PRs where secrets are not accessible if: failure() && env.SLACK_WEBHOOK_URL_NOTIFICATIONS != '' @@ -69,23 +69,9 @@ jobs: webhook: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} webhook-type: incoming-webhook payload: | - text: "${{ github.workflow }} / ${{ github.job }} failed on ${{ github.ref_name }}" + text: "${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }}" blocks: - - type: "header" - text: - type: "plain_text" - text: "License Compliance Failure" - type: "section" - fields: - - type: "mrkdwn" - text: "*Project:*\n${{ github.repository }}" - - type: "mrkdwn" - text: "*Workflow:*\n${{ github.workflow }}" - - type: "mrkdwn" - text: "*Job:*\n${{ github.job }}" - - type: "mrkdwn" - text: "*Branch:*\n`${{ github.ref_name }}`" - - type: "mrkdwn" - text: "*Author:*\n${{ github.actor }}" - - type: "mrkdwn" - text: "*Run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>" + text: + type: "mrkdwn" + text: "${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}`\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>" From c87d1f89f0c7208ad0e9d0c8a3d6c0626ff02e10 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 16:49:14 +0100 Subject: [PATCH 04/13] notify --- .github/workflows/license_compliance.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index 1a09f026b8..456a3cf755 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -69,9 +69,12 @@ jobs: webhook: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} webhook-type: incoming-webhook payload: | - text: "${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }}" + text: ${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }} blocks: - type: "section" text: type: "mrkdwn" - text: "${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}`\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>" + text: >- + ${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}`\n\n + \n\n + <${{ github.server_url }}/${{github.repository }}/actions/runs/${{ github.run_id }}|View Logs> From a7a48514e695c5f8c661bb4d8c3c8dcece2718ae Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 17:06:27 +0100 Subject: [PATCH 05/13] try composite action --- .github/actions/notify_slack/action.yml | 30 ++++++++++++++++++++++++ .github/workflows/license_compliance.yml | 20 +++++----------- 2 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 .github/actions/notify_slack/action.yml diff --git a/.github/actions/notify_slack/action.yml b/.github/actions/notify_slack/action.yml new file mode 100644 index 0000000000..9f2b855c2f --- /dev/null +++ b/.github/actions/notify_slack/action.yml @@ -0,0 +1,30 @@ +name: "Notify Slack on CI failure" +description: "Sends a Slack notification with workflow failure details" + +inputs: + slack-webhook-url: + description: "Slack Webhook URL" + required: true + mention-here: + description: "Whether to mention @here in the notification" + required: false + default: "true" + +runs: + using: "composite" + steps: + - name: Send Slack notification + uses: slackapi/slack-github-action@v2 + with: + webhook: ${{ inputs.slack-webhook-url }} + webhook-type: incoming-webhook + payload: | + text: ${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }} + blocks: + - type: "section" + text: + type: "mrkdwn" + text: | + ${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}` + ${{ inputs.mention-here == 'true' && '' || '' }} + <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs> diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index 456a3cf755..c9686fa910 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -62,19 +62,11 @@ jobs: run: echo "${{ steps.license_check_report.outputs.report }}" - name: Notify Slack on failure - # Skip on fork PRs where secrets are not accessible + # This step would fail when running in PRs opened from forks since + # secrets are not accessible. + # To prevent showing bogus failures in those PRs we skip the step. + # The workflow will fail in any case if the actual check fails in the previous steps. if: failure() && env.SLACK_WEBHOOK_URL_NOTIFICATIONS != '' - uses: slackapi/slack-github-action@v2 + uses: ./.github/actions/notify_slack with: - webhook: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - webhook-type: incoming-webhook - payload: | - text: ${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }} - blocks: - - type: "section" - text: - type: "mrkdwn" - text: >- - ${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}`\n\n - \n\n - <${{ github.server_url }}/${{github.repository }}/actions/runs/${{ github.run_id }}|View Logs> + slack-webhook-url: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} From fc94644106239c97167b77b09e169de5cf71ab54 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 4 Mar 2026 17:33:27 +0100 Subject: [PATCH 06/13] refactor workflows --- .github/workflows/docs_search_sync.yml | 20 +- .github/workflows/e2e.yml | 20 +- .github/workflows/license_compliance.yml | 13 +- .github/workflows/slow.yml | 20 +- .github/workflows/tests.yml | 231 +++-------------------- 5 files changed, 39 insertions(+), 265 deletions(-) diff --git a/.github/workflows/docs_search_sync.yml b/.github/workflows/docs_search_sync.yml index 3dff6fa82c..218f37acef 100644 --- a/.github/workflows/docs_search_sync.yml +++ b/.github/workflows/docs_search_sync.yml @@ -46,22 +46,8 @@ jobs: DEEPSET_API_KEY_DOCS_SEARCH: ${{ secrets.DEEPSET_API_KEY_DOCS_SEARCH }} run: python ./.github/utils/docs_search_sync.py - - name: Send event to Datadog for nightly failures + - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: masci/datadog@v1 + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "error" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c1be52beee..262e982e9b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -40,22 +40,8 @@ jobs: - name: Run tests run: hatch run e2e:test - - name: Send event to Datadog + - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: masci/datadog@v1 + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "error" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index c9686fa910..ea7d03061b 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -10,7 +10,6 @@ on: schedule: - cron: "0 0 * * *" # every day at midnight env: - SLACK_WEBHOOK_URL_NOTIFICATIONS: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} PYTHON_VERSION: "3.10" jobs: @@ -23,10 +22,6 @@ jobs: - name: Checkout the code uses: actions/checkout@v6 - # TODO: Remove this step after testing Slack notifications - - name: Force failure for testing - run: exit 1 - - name: Setup Python uses: actions/setup-python@v6 with: @@ -62,11 +57,7 @@ jobs: run: echo "${{ steps.license_check_report.outputs.report }}" - name: Notify Slack on failure - # This step would fail when running in PRs opened from forks since - # secrets are not accessible. - # To prevent showing bogus failures in those PRs we skip the step. - # The workflow will fail in any case if the actual check fails in the previous steps. - if: failure() && env.SLACK_WEBHOOK_URL_NOTIFICATIONS != '' + if: failure() uses: ./.github/actions/notify_slack with: - slack-webhook-url: ${{ env.SLACK_WEBHOOK_URL_NOTIFICATIONS }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/slow.yml b/.github/workflows/slow.yml index 30e227f96c..0ecb7f889c 100644 --- a/.github/workflows/slow.yml +++ b/.github/workflows/slow.yml @@ -154,25 +154,11 @@ jobs: - name: Run tests run: hatch run test:integration-only-slow - - name: Send event to Datadog for nightly failures + - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: masci/datadog@v1 + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "error" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} slow-integration-tests-completed: # This job always runs and succeeds if all tests succeed or are skipped. It is required by Branch Protection rules. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a26e1fe73..a930b19c86 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,36 +56,11 @@ jobs: - name: Check presence of license header run: docker run --rm -v "$(pwd):/github/workspace" ghcr.io/korandoru/hawkeye check - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} check-imports: needs: format @@ -104,36 +79,11 @@ jobs: - name: Check imports run: hatch run python .github/utils/check_imports.py - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} unit-tests: name: Unit / ${{ matrix.os }} @@ -181,36 +131,11 @@ jobs: with: path-to-lcov: coverage.xml - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} mypy: needs: unit-tests @@ -253,36 +178,11 @@ jobs: mkdir .mypy_cache hatch run test:types - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} integration-tests-linux: name: Integration / ubuntu-latest @@ -308,36 +208,11 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} integration-tests-macos: name: Integration / macos-latest @@ -372,36 +247,11 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} integration-tests-windows: name: Integration / windows-latest @@ -429,36 +279,11 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) && github.ref_name == 'main' - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) && github.ref_name == 'main' - uses: masci/datadog@v1 + - name: Notify Slack on failure + if: failure() && github.ref_name == 'main' + uses: ./.github/actions/notify_slack with: - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} - api-url: https://api.datadoghq.eu - events: | - - title: "${{ github.workflow }} workflow" - text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" - source_type_name: "Github" - host: ${{ github.repository_owner }} - tags: - - "project:${{ github.repository }}" - - "job:${{ github.job }}" - - "run_id:${{ github.run_id }}" - - "workflow:${{ github.workflow }}" - - "branch:${{ github.ref_name }}" - - "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} trigger-catch-all: name: Tests completed From b39e8b13eb39799c07c490cc99292b2b8823e2ac Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 5 Mar 2026 09:23:23 +0100 Subject: [PATCH 07/13] use externally published action --- .github/actions/notify_slack/action.yml | 30 ------------------------ .github/workflows/docs_search_sync.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/license_compliance.yml | 7 +++++- .github/workflows/slow.yml | 2 +- .github/workflows/tests.yml | 14 +++++------ 6 files changed, 16 insertions(+), 41 deletions(-) delete mode 100644 .github/actions/notify_slack/action.yml diff --git a/.github/actions/notify_slack/action.yml b/.github/actions/notify_slack/action.yml deleted file mode 100644 index 9f2b855c2f..0000000000 --- a/.github/actions/notify_slack/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Notify Slack on CI failure" -description: "Sends a Slack notification with workflow failure details" - -inputs: - slack-webhook-url: - description: "Slack Webhook URL" - required: true - mention-here: - description: "Whether to mention @here in the notification" - required: false - default: "true" - -runs: - using: "composite" - steps: - - name: Send Slack notification - uses: slackapi/slack-github-action@v2 - with: - webhook: ${{ inputs.slack-webhook-url }} - webhook-type: incoming-webhook - payload: | - text: ${{ github.repository }} - ${{ github.workflow }} failed on ${{ github.ref_name }} - blocks: - - type: "section" - text: - type: "mrkdwn" - text: | - ${{ github.repository }} - *${{ github.workflow }}* failed on `${{ github.ref_name }}` - ${{ inputs.mention-here == 'true' && '' || '' }} - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs> diff --git a/.github/workflows/docs_search_sync.yml b/.github/workflows/docs_search_sync.yml index 218f37acef..742aadd3c6 100644 --- a/.github/workflows/docs_search_sync.yml +++ b/.github/workflows/docs_search_sync.yml @@ -48,6 +48,6 @@ jobs: - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 262e982e9b..932e4269b1 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -42,6 +42,6 @@ jobs: - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index ea7d03061b..41e59d33ea 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -27,6 +27,11 @@ jobs: with: python-version: "${{ env.PYTHON_VERSION }}" + - name: fail here + run: | + echo "fail here" + exit 1 + - name: Get direct dependencies run: | pip install toml @@ -58,6 +63,6 @@ jobs: - name: Notify Slack on failure if: failure() - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/slow.yml b/.github/workflows/slow.yml index 0ecb7f889c..d801970d74 100644 --- a/.github/workflows/slow.yml +++ b/.github/workflows/slow.yml @@ -156,7 +156,7 @@ jobs: - name: Notify Slack on nightly failure if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a930b19c86..a0fbb3a118 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -81,7 +81,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -133,7 +133,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -180,7 +180,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -210,7 +210,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -249,7 +249,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} @@ -281,7 +281,7 @@ jobs: - name: Notify Slack on failure if: failure() && github.ref_name == 'main' - uses: ./.github/actions/notify_slack + uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} From b61ae3fd909313ef88ef6aee7ed2091673b9639f Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 5 Mar 2026 09:27:48 +0100 Subject: [PATCH 08/13] rm trigger --- .github/workflows/license_compliance.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/license_compliance.yml b/.github/workflows/license_compliance.yml index 41e59d33ea..2382e4c6e1 100644 --- a/.github/workflows/license_compliance.yml +++ b/.github/workflows/license_compliance.yml @@ -27,11 +27,6 @@ jobs: with: python-version: "${{ env.PYTHON_VERSION }}" - - name: fail here - run: | - echo "fail here" - exit 1 - - name: Get direct dependencies run: | pip install toml From cb1c964f15d78deb30ce64a83175ab68020eb4bf Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 5 Mar 2026 18:25:46 +0100 Subject: [PATCH 09/13] try to simplify more --- .github/workflows/tests.yml | 53 ++++++++++--------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0fbb3a118..58192e898c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,12 +56,6 @@ jobs: - name: Check presence of license header run: docker run --rm -v "$(pwd):/github/workspace" ghcr.io/korandoru/hawkeye check - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - check-imports: needs: format runs-on: ubuntu-slim @@ -79,12 +73,6 @@ jobs: - name: Check imports run: hatch run python .github/utils/check_imports.py - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - unit-tests: name: Unit / ${{ matrix.os }} needs: format @@ -131,12 +119,6 @@ jobs: with: path-to-lcov: coverage.xml - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - mypy: needs: unit-tests runs-on: ubuntu-latest @@ -148,6 +130,9 @@ jobs: # fails with a `no merge base` error fetch-depth: 0 + - name: make it fail + run: exit 1 + - name: Get changed files id: files uses: tj-actions/changed-files@v47 @@ -178,12 +163,6 @@ jobs: mkdir .mypy_cache hatch run test:types - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - integration-tests-linux: name: Integration / ubuntu-latest needs: unit-tests @@ -208,12 +187,6 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - integration-tests-macos: name: Integration / macos-latest needs: unit-tests @@ -247,12 +220,6 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 - with: - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} - integration-tests-windows: name: Integration / windows-latest needs: unit-tests @@ -279,9 +246,17 @@ jobs: - name: Run run: hatch run test:integration-only-fast - - name: Notify Slack on failure - if: failure() && github.ref_name == 'main' - uses: deepset-ai/notify-slack-action@v1 + notify-slack: + if: failure() && github.ref_name == 'main' + needs: + - check-imports + - mypy + - integration-tests-linux + - integration-tests-macos + - integration-tests-windows + runs-on: ubuntu-latest + steps: + - uses: deepset-ai/notify-slack-action@v1 with: slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }} From fbc859f8a5656e04fe54b8acfc55c7a5ed5cb100 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 5 Mar 2026 18:26:13 +0100 Subject: [PATCH 10/13] slim --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 58192e898c..5a77633832 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -254,7 +254,7 @@ jobs: - integration-tests-linux - integration-tests-macos - integration-tests-windows - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: deepset-ai/notify-slack-action@v1 with: From 7a7532e3e83494ccd7e74a6bae9792f5a74eb087 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Thu, 5 Mar 2026 18:26:55 +0100 Subject: [PATCH 11/13] test --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a77633832..f5f62fc3a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -247,7 +247,8 @@ jobs: run: hatch run test:integration-only-fast notify-slack: - if: failure() && github.ref_name == 'main' + if: failure() + # #&& github.ref_name == 'main' needs: - check-imports - mypy From 65a22ca867ba329237a42ca67272ecced73134fc Mon Sep 17 00:00:00 2001 From: anakin87 Date: Fri, 6 Mar 2026 07:42:00 +0100 Subject: [PATCH 12/13] trigger tests --- haystack/core/pipeline/async_pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/haystack/core/pipeline/async_pipeline.py b/haystack/core/pipeline/async_pipeline.py index 03910acc5b..cc67f96f5b 100644 --- a/haystack/core/pipeline/async_pipeline.py +++ b/haystack/core/pipeline/async_pipeline.py @@ -28,6 +28,8 @@ class AsyncPipeline(PipelineBase): """ Asynchronous version of the Pipeline orchestration engine. + TRIGGER!!! + Manages components in a pipeline allowing for concurrent processing when the pipeline's execution graph permits. This enables efficient processing of components by minimizing idle time and maximizing resource utilization. """ From df2588a04d71348648d1d84cabd4c86caeccb0fe Mon Sep 17 00:00:00 2001 From: anakin87 Date: Fri, 6 Mar 2026 07:56:27 +0100 Subject: [PATCH 13/13] rm triggers --- .github/workflows/tests.yml | 9 ++------- haystack/core/pipeline/async_pipeline.py | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f5f62fc3a1..bd619b0639 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -129,10 +129,6 @@ jobs: # With the default value of 1, there are corner cases where tj-actions/changed-files # fails with a `no merge base` error fetch-depth: 0 - - - name: make it fail - run: exit 1 - - name: Get changed files id: files uses: tj-actions/changed-files@v47 @@ -246,9 +242,8 @@ jobs: - name: Run run: hatch run test:integration-only-fast - notify-slack: - if: failure() - # #&& github.ref_name == 'main' + notify-slack-on-failure: + if: failure() && github.ref_name == 'main' needs: - check-imports - mypy diff --git a/haystack/core/pipeline/async_pipeline.py b/haystack/core/pipeline/async_pipeline.py index cc67f96f5b..03910acc5b 100644 --- a/haystack/core/pipeline/async_pipeline.py +++ b/haystack/core/pipeline/async_pipeline.py @@ -28,8 +28,6 @@ class AsyncPipeline(PipelineBase): """ Asynchronous version of the Pipeline orchestration engine. - TRIGGER!!! - Manages components in a pipeline allowing for concurrent processing when the pipeline's execution graph permits. This enables efficient processing of components by minimizing idle time and maximizing resource utilization. """