From b9fe1dcdf71602f5d733dbd78adce06bba20d615 Mon Sep 17 00:00:00 2001 From: gtwang01 <110636181+gtwang01@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:20:26 -0800 Subject: [PATCH] Disable retry build (#4124) 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: https://github.com/facebookresearch/faiss/pull/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 --- .github/workflows/nightly.yml | 5 +++-- .github/workflows/retry_build.yml | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ef1e8d2357..c8d5dc7cf3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 }} diff --git a/.github/workflows/retry_build.yml b/.github/workflows/retry_build.yml index 603ae5aab6..ff4e944adf 100644 --- a/.github/workflows/retry_build.yml +++ b/.github/workflows/retry_build.yml @@ -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