Skip to content

Commit

Permalink
Fix periodic rebase #594
Browse files Browse the repository at this point in the history
Fixes the following bugs in the periodic rebase:
Sends multiple messages on failure instead of one
Cancels entire job if one branch fails
  • Loading branch information
buffalu committed Feb 26, 2024
1 parent 48bba11 commit 3be84f5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/rebase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: "Rebase jito-solana from upstream solana-labs/solana"

on:
schedule:
- cron: "0 18 * * 1-5"
- cron: "30 18 * * 1-5"

jobs:
rebase:
Expand All @@ -31,6 +31,7 @@ jobs:
- master
- v1.18
- v1.17
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -53,9 +54,10 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Jito Infrastructure"
- name: Rebase
id: rebase
run: git rebase upstream/${{ matrix.branch }}
- name: Send warning for rebase error
if: failure()
if: failure() && steps.rebase.outcome == 'failure'
uses: slackapi/[email protected]
with:
payload: |
Expand All @@ -65,6 +67,7 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Check if rebase applied
id: check_rebase_applied
run: |
PRE_REBASE_SHA=$(git rev-parse ${{ matrix.branch }})
POST_REBASE_SHA=$(git rev-parse HEAD)
Expand All @@ -75,7 +78,7 @@ jobs:
echo "Rebase applied successfully."
fi
- name: Send warning for rebase error
if: failure()
if: failure() && steps.check_rebase_applied.outcome == 'failure'
uses: slackapi/[email protected]
with:
payload: |
Expand All @@ -94,6 +97,7 @@ jobs:
- name: Wait for buildkite to start build
run: sleep 20
- name: Wait for buildkite to finish
id: wait_for_buildkite
timeout-minutes: 300
run: |
while true; do
Expand Down Expand Up @@ -123,7 +127,7 @@ jobs:
done
- name: Send failure update
uses: slackapi/[email protected]
if: failure()
if: failure() && steps.wait_for_buildkite.outcome == 'failure'
with:
payload: |
{
Expand Down

0 comments on commit 3be84f5

Please sign in to comment.