πͺ’ Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
ci: use Slack workflow webhooks for failure notifications (#14004)
Tobias Wochinger6d6d6863991b
diff --git a/.github/actions/notify-slack-failure/action.yml b/.github/actions/notify-slack-failure/action.ymlnew file mode 100644index 0000000000..add31354c0--- /dev/null+++ b/.github/actions/notify-slack-failure/action.yml@@ -0,0 +1,30 @@+name: Notify Slack Failure+description: Send a CI failure notification to a Slack Workflow webhook.++inputs:+ title:+ description: Slack notification header.+ required: true+ message:+ description: Slack notification fallback text.+ required: true+ webhook-url:+ description: Slack Workflow webhook URL.+ required: true++runs:+ using: composite+ steps:+ - name: Notify Slack+ uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3+ with:+ webhook: ${{ inputs.webhook-url }}+ webhook-type: webhook-trigger+ payload: |+ title: "${{ inputs.title }}"+ message: "${{ inputs.message }}"+ ref: "${{ github.ref_name }}"+ actor: "${{ github.actor }}"+ event: "${{ github.event_name }}"+ commit: "${{ github.sha }}"+ workflow_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"diff --git a/.github/workflows/_notify_slack_failure.yml b/.github/workflows/_notify_slack_failure.ymldeleted file mode 100644index 5318a326f2..0000000000--- a/.github/workflows/_notify_slack_failure.yml+++ /dev/null@@ -1,83 +0,0 @@-name: WorkflowCall - Notify Slack Failure--on:- workflow_call:- inputs:- title:- description: Slack notification header.- required: true- type: string- message:- description: Slack notification fallback text.- required: true- type: string- secrets:- SLACK_WEBHOOK_URL:- required: true--permissions: {}--jobs:- notify:- runs-on: ubuntu-latest- steps:- - name: Notify Slack- uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3- with:- webhook: ${{ secrets.SLACK_WEBHOOK_URL }}- webhook-type: incoming-webhook- payload: |- {- "text": "${{ inputs.message }}",- "blocks": [- {- "type": "header",- "text": {- "type": "plain_text",- "text": "${{ inputs.title }}",- "emoji": true- }- },- {- "type": "section",- "fields": [- {- "type": "mrkdwn",- "text": "*Ref:*\n`${{ github.ref_name }}`"- },- {- "type": "mrkdwn",- "text": "*Triggered by:*\n${{ github.actor }}"- }- ]- },- {- "type": "section",- "fields": [- {- "type": "mrkdwn",- "text": "*Event:*\n`${{ github.event_name }}`"- },- {- "type": "mrkdwn",- "text": "*Commit:*\n`${{ github.sha }}`"- }- ]- },- {- "type": "actions",- "elements": [- {- "type": "button",- "text": {- "type": "plain_text",- "text": "View Workflow Logs",- "emoji": true- },- "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",- "style": "danger"- }- ]- }- ]- }diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex 644ade0025..691ede0375 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -120,9 +120,16 @@ jobs:notify-slack-on-failure:needs: [affected-services, affected-environments, ecs-deploy]if: failure()- uses: ./.github/workflows/_notify_slack_failure.yml- secrets:- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}- with:- title: "β Deploy Failed"- message: "β Deploy failed on ${{ github.ref_name }}"+ runs-on: blacksmith-4vcpu-ubuntu-2404+ permissions:+ contents: read+ steps:+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ with:+ persist-credentials: false+ - name: Notify Slack+ uses: ./.github/actions/notify-slack-failure+ with:+ title: "β Deploy Failed"+ message: "β Deploy failed on ${{ github.ref_name }}"+ webhook-url: ${{ secrets.SLACK_CI_FAILURE_WORKFLOW_WEBHOOK_URL }}diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex 202978e46c..6acc3ea7bb 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -837,54 +837,17 @@ jobs:if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}run: exit 1working-directory: .+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ if: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))+ with:+ persist-credentials: false- name: Notify Slackif: failure() && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))- uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3- with:- webhook: ${{ secrets.SLACK_WEBHOOK_URL }}- webhook-type: incoming-webhook- payload: |- {- "text": "β CI failed on ${{ github.ref_name }}",- "blocks": [- {- "type": "header",- "text": {- "type": "plain_text",- "text": "β CI Failed",- "emoji": true- }- },- {- "type": "section",- "fields": [- {- "type": "mrkdwn",- "text": "*Branch/Tag:*\n`${{ github.ref_name }}`"- },- {- "type": "mrkdwn",- "text": "*Triggered by:*\n${{ github.actor }}"- }- ]- },- {- "type": "actions",- "elements": [- {- "type": "button",- "text": {- "type": "plain_text",- "text": "View Workflow Logs",- "emoji": true- },- "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",- "style": "danger"- }- ]- }- ]- }+ uses: ./.github/actions/notify-slack-failure+ with:+ title: "β CI Failed"+ message: "β CI failed on ${{ github.ref_name }}"+ webhook-url: ${{ secrets.SLACK_CI_FAILURE_WORKFLOW_WEBHOOK_URL }}- name: Output job resultsrun: |echo "Job results: ${STEPS_SET_SUCCESS_OUTPUT_OUTPUTS_SUCCESS}"@@ -1156,51 +1119,14 @@ jobs:- name: Fail when a release image job failedif: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')run: exit 1+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ if: failure()+ with:+ persist-credentials: false- name: Notify Slackif: failure()- uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3- with:- webhook: ${{ secrets.SLACK_WEBHOOK_URL }}- webhook-type: incoming-webhook- payload: |- {- "text": "β Docker release failed on ${{ github.ref_name }}",- "blocks": [- {- "type": "header",- "text": {- "type": "plain_text",- "text": "β Docker Release Failed",- "emoji": true- }- },- {- "type": "section",- "fields": [- {- "type": "mrkdwn",- "text": "*Tag:*\n`${{ github.ref_name }}`"- },- {- "type": "mrkdwn",- "text": "*Triggered by:*\n${{ github.actor }}"- }- ]- },- {- "type": "actions",- "elements": [- {- "type": "button",- "text": {- "type": "plain_text",- "text": "View Workflow Logs",- "emoji": true- },- "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",- "style": "danger"- }- ]- }- ]- }+ uses: ./.github/actions/notify-slack-failure+ with:+ title: "β Docker Release Failed"+ message: "β Docker release failed on ${{ github.ref_name }}"+ webhook-url: ${{ secrets.SLACK_CI_FAILURE_WORKFLOW_WEBHOOK_URL }}diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 993b53ce73..2331f1e233 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -9,7 +9,7 @@ permissions: {}jobs:release:- runs-on: ubuntu-latest+ runs-on: blacksmith-4vcpu-ubuntu-2404environment: "protected branches"steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2@@ -26,9 +26,16 @@ jobs:notify-slack-on-failure:needs: releaseif: failure()- uses: ./.github/workflows/_notify_slack_failure.yml- secrets:- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}- with:- title: "β Release Failed"- message: "β Release failed on ${{ github.ref_name }}"+ runs-on: blacksmith-4vcpu-ubuntu-2404+ permissions:+ contents: read+ steps:+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ with:+ persist-credentials: false+ - name: Notify Slack+ uses: ./.github/actions/notify-slack-failure+ with:+ title: "β Release Failed"+ message: "β Release failed on ${{ github.ref_name }}"+ webhook-url: ${{ secrets.SLACK_CI_FAILURE_WORKFLOW_WEBHOOK_URL }}diff --git a/.github/workflows/sdk-api-spec.yml b/.github/workflows/sdk-api-spec.ymlindex 19de6807e8..30f255ad46 100644--- a/.github/workflows/sdk-api-spec.yml+++ b/.github/workflows/sdk-api-spec.yml@@ -17,7 +17,7 @@ permissions:jobs:generate-sdk-api-specs:- runs-on: ubuntu-latest+ runs-on: blacksmith-4vcpu-ubuntu-2404steps:- name: Checkout repositoryuses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2@@ -163,9 +163,16 @@ jobs:notify-slack-on-failure:needs: generate-sdk-api-specsif: failure()- uses: ./.github/workflows/_notify_slack_failure.yml- secrets:- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}- with:- title: "β SDK API Spec Generation Failed"- message: "β SDK API spec generation failed on ${{ github.ref_name }}"+ runs-on: blacksmith-4vcpu-ubuntu-2404+ permissions:+ contents: read+ steps:+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ with:+ persist-credentials: false+ - name: Notify Slack+ uses: ./.github/actions/notify-slack-failure+ with:+ title: "β SDK API Spec Generation Failed"+ message: "β SDK API spec generation failed on ${{ github.ref_name }}"+ webhook-url: ${{ secrets.SLACK_CI_FAILURE_WORKFLOW_WEBHOOK_URL }}