Skip to content

Commit

Permalink
PM-1891 - Optimize Alerting
Browse files Browse the repository at this point in the history
  • Loading branch information
kaozenn committed Jul 15, 2024
1 parent 2f06b0d commit 676b3bf
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/sync-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
test-peer:
needs: parse-mainnet-seed-list
runs-on: minafoundation-xlarge-runners
outputs:
failed_seeds: ${{ steps.test-peer.outputs.failed_seeds }}
if: needs.parse-mainnet-seed-list.outputs.seeds != '[]' && needs.parse-mainnet-seed-list.outputs.seeds != ''
continue-on-error: true
strategy:
Expand All @@ -40,13 +42,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
if: ${{ failure() }}
uses: slackapi/[email protected]
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=$failed_seeds \n ${{ matrix.seed }}" >> $GITHUB_OUTPUT
print-failed-seeds:
needs: test-peer
runs-on: minafoundation-default-runners
steps:
- name: Echo Failed Seeds
run: |
echo "Update Failed Seed List"
cat $GITHUB_OUTPUT
# send-slack-notification:
# needs: test-peer
# runs-on: minafoundation-default-runners
# steps:
# - name: Post to a Slack channel
# id: slack
# if: ${{ failure() }}
# uses: slackapi/[email protected]
# 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 }}

0 comments on commit 676b3bf

Please sign in to comment.