Skip to content

Commit

Permalink
Disable retry build (#4124)
Browse files Browse the repository at this point in the history
Summary:
```gh run``` seems to time out every now and then, crashing the retry build. I suspect this because whenever the retry build fails, it lacks any logging that would happen if ```gh run``` finishes.

Changing to use ```gh view``` and sleeping for 10 minutes before viewing again may resolve this issue, as it isn't continuously watching.

Pull Request resolved: #4124

Test Plan:
https://github.com/gtwang01/faiss/actions/runs/12718383559/job/35456710369

{F1974306037}
{F1974306103}

Also, monitor nightlies to ensure it works properly

Reviewed By: mengdilin

Differential Revision: D68032708

Pulled By: gtwang01

fbshipit-source-id: 02f57239e6203a1d0accc09c48aa7071e553878f
  • Loading branch information
gtwang01 authored and facebook-github-bot committed Jan 14, 2025
1 parent 88676b8 commit b9fe1dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_DEBUG: api
run: |
gh workflow run retry_build.yml \
-F run_id=${{ github.run_id }}
echo Disabled auto retry workflow
# gh workflow run retry_build.yml \
# -F run_id=${{ github.run_id }}
7 changes: 6 additions & 1 deletion .github/workflows/retry_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_DEBUG: api
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
while gh run view ${{ inputs.run_id }} --json status | grep -q in_progress
do
echo Workflow in progress - sleeping for 10 minutes then checking again
sleep 10m
done
# Only retry if there are failed jobs
if gh run view ${{ inputs.run_id }} --exit-status; then
echo Workflow succeeded - no retry necessary.
else
echo Workflow failed - initiating retry.
gh run rerun ${{ inputs.run_id }} --failed
fi

0 comments on commit b9fe1dc

Please sign in to comment.