From 4d82b8c741837755da70b0a4907e7aabaa1b4619 Mon Sep 17 00:00:00 2001 From: David Lehuby Date: Mon, 15 Jul 2024 15:31:37 +1000 Subject: [PATCH] PM-1891 - Optimize Alerting --- .github/workflows/sync-check.yaml | 38 +++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sync-check.yaml b/.github/workflows/sync-check.yaml index ffe58a4..f0f89a2 100644 --- a/.github/workflows/sync-check.yaml +++ b/.github/workflows/sync-check.yaml @@ -40,13 +40,33 @@ jobs: --peer ${{ matrix.seed }} - name: Wait for Daemon to Sync id: wait-for-sync - run: ./scripts/mina-sync-monitor.sh - - name: Post to a Slack channel - id: slack + run: exit 1 && ./scripts/mina-sync-monitor.sh + - name: Record Failing Seed + id: record-fail if: ${{ failure() }} - uses: slackapi/slack-github-action@v1.26.0 - with: - channel-id: "mf-alerts-info" - slack-message: "Failed to synchronize with Mina Daemon using seed peer:\n *_${{ matrix.seed }}_*" - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + run: | + echo "Update Failed Seed List" + echo "failed-seeds-${{strategy.job-index}}=${{ matrix.seed }}" + + print-failed-seeds: + needs: test-peer + runs-on: minafoundation-default-runners + steps: + - name: Echo Failed Seeds + run: | + echo "Failed Seed List" + + + # send-slack-notification: + # needs: test-peer + # runs-on: minafoundation-default-runners + # steps: + # - name: Post to a Slack channel + # id: slack + # if: ${{ failure() }} + # uses: slackapi/slack-github-action@v1.26.0 + # with: + # channel-id: "mf-alerts-info" + # slack-message: "Failed to synchronize with Mina Daemon using seed peer:\n *_${{ matrix.seed }}_*" + # env: + # SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}