-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add monitoring test matrix #1848
Changes from 12 commits
1f5c87a
f71b185
f30c9ed
d3f9bf5
8090d66
6dba9fb
6b312b3
5114dc9
09c27c2
c4b1904
f62eba1
4484141
2a7498d
95e75b5
233cfdf
96b5faa
bb3f859
58439b7
b9ede97
36d0e86
93cc52d
69274ff
8d7f795
c596855
ff6d927
9153db0
69e0db7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"core": { | ||
"generateCommand": "generateCoreChainsToMonitor", | ||
"configFile": "__auto-generated-core-chains.json", | ||
"slackTokens": { | ||
"assertion": "CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN", | ||
"batch-poster": "CORE_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN", | ||
"retryable": "CORE_CHAIN_RETRYABLE_MONITORING_SLACK_TOKEN" | ||
}, | ||
"slackChannels": { | ||
"assertion": "CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL", | ||
"batch-poster": "CORE_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL", | ||
"retryable": "CORE_CHAIN_RETRYABLE_MONITORING_SLACK_CHANNEL" | ||
} | ||
}, | ||
"orbit": { | ||
"generateCommand": "generateOrbitChainsToMonitor", | ||
"configFile": "__auto-generated-orbit-chains.json", | ||
"slackTokens": { | ||
"assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN", | ||
"batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN", | ||
"retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_TOKEN" | ||
}, | ||
"slackChannels": { | ||
"assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL", | ||
"batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL", | ||
"retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_CHANNEL" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Monitoring | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also accept arguments to selectively run the monitors, (including all)? It can be helpful when we're debugging a single monitor and don't want to run the whole matrix again and again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I split it out into 6hr and 24hr scripts, so either of those can be triggered, but we can't trigger them individually unless we create a file for each type of monitoring |
||
schedule: | ||
- cron: "0 */6 * * *" # Run every 6 hours | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently retryable monitor runs every 24 hours, not 6. Can we account for the flexibility of runner frequency as a part of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated to use a 24hr schedule just for that monitor |
||
|
||
env: | ||
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} | ||
NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }} | ||
ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }} | ||
NODE_ENV: "CI" | ||
|
||
jobs: | ||
run-monitoring: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
chain: [core, orbit] | ||
monitor: [assertion, batch-poster, retryable] | ||
steps: | ||
- name: Checkout repositories | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: OffchainLabs/arbitrum-token-bridge | ||
|
||
- name: Install node_modules | ||
uses: OffchainLabs/actions/node-modules/install@main | ||
|
||
- name: Checkout Arbitrum Monitoring repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: OffchainLabs/arbitrum-monitoring | ||
path: arbitrum-monitoring | ||
|
||
- name: Setup Node and install dependencies | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
- run: cd ./arbitrum-monitoring && yarn install | ||
|
||
- name: Load configuration | ||
id: config | ||
run: | | ||
CONFIG=$(cat .github/workflows/monitor-config.json | jq -r '.${{ matrix.chain }}') | ||
echo "generate_command=$(echo $CONFIG | jq -r '.generateCommand')" >> $GITHUB_OUTPUT | ||
echo "config_file=$(echo $CONFIG | jq -r '.configFile')" >> $GITHUB_OUTPUT | ||
echo "slack_token=$(echo $CONFIG | jq -r '.slackTokens.${{ matrix.monitor }}')" >> $GITHUB_OUTPUT | ||
echo "slack_channel=$(echo $CONFIG | jq -r '.slackChannels.${{ matrix.monitor }}')" >> $GITHUB_OUTPUT | ||
|
||
- name: Generate chains JSON | ||
run: yarn workspace arb-token-bridge-ui ${{ steps.config.outputs.generate_command }} | ||
env: | ||
BATCH_POSTER_MONITORING: ${{ matrix.monitor == 'batch-poster' }} | ||
|
||
- name: Copy chains JSON to Arbitrum Monitoring | ||
run: cp ./packages/arb-token-bridge-ui/public/${{ steps.config.outputs.config_file }} ./arbitrum-monitoring/packages/${{ matrix.monitor }}-monitor/config.json | ||
|
||
- name: Run monitoring command | ||
run: cd ./arbitrum-monitoring && yarn ${{ matrix.monitor }}-monitor --enableAlerting | ||
env: | ||
SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} | ||
SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} | ||
|
||
- name: Clean up | ||
douglance marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: rm ./packages/arb-token-bridge-ui/public/${{ steps.config.outputs.config_file }} |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be removed before merge