🪢 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: notify slack on critical workflow failures (#13910)
Tobias Wochingera7a13b54c322
diff --git a/.github/workflows/_notify_slack_failure.yml b/.github/workflows/_notify_slack_failure.ymlnew file mode 100644index 0000000000..5318a326f2--- /dev/null+++ b/.github/workflows/_notify_slack_failure.yml@@ -0,0 +1,83 @@+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 7c9f6c686f..644ade0025 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -116,3 +116,13 @@ jobs:with:service: ${{ matrix.service }}environment: ${{ matrix.environment }}++ 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 }}"diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 1a89d00ea1..993b53ce73 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -22,3 +22,13 @@ jobs:run: git push "https://x-access-token:${GH_ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" +main:productionenv:GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}++ notify-slack-on-failure:+ needs: release+ if: 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 }}"diff --git a/.github/workflows/sdk-api-spec.yml b/.github/workflows/sdk-api-spec.ymlindex 026aab24b2..19de6807e8 100644--- a/.github/workflows/sdk-api-spec.yml+++ b/.github/workflows/sdk-api-spec.yml@@ -159,3 +159,13 @@ jobs:# Create PR with original author as reviewergh pr create --title "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::7}" --body "" --reviewer "$ORIGINAL_AUTHOR"++ notify-slack-on-failure:+ needs: generate-sdk-api-specs+ if: 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 }}"