From 9b91c0f8d882c7adca0b92a1bd8c21bc8dc6e4ae Mon Sep 17 00:00:00 2001 From: barry-jin Date: Wed, 27 Oct 2021 12:01:36 -0700 Subject: [PATCH 1/5] [CI] Add timeout and retry to linkcheck --- .github/workflows/link_check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index 16cb2241f137..d37c9fde2146 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -64,6 +64,10 @@ jobs: python -m pip install --user -e python - name: Link Check + uses: nick-invision/retry@v2 + with: + timeout_minutes: 10 + max_attempts: 3 run: | cd docs/python_docs/python make clean From a93de8f35a5c662dbcd5a9d2684ddcdf5cab9dd8 Mon Sep 17 00:00:00 2001 From: barry-jin Date: Wed, 27 Oct 2021 12:03:51 -0700 Subject: [PATCH 2/5] update --- .github/workflows/link_check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index d37c9fde2146..ab4ba6abfb21 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -68,8 +68,8 @@ jobs: with: timeout_minutes: 10 max_attempts: 3 - run: | - cd docs/python_docs/python - make clean - make linkcheck EVAL=0 - shell: bash + retry_on: timeout + comand: | + cd docs/python_docs/python + make clean + make linkcheck EVAL=0 From d7490b628376fd4114e17a96e0da308ec86888ad Mon Sep 17 00:00:00 2001 From: barry-jin Date: Wed, 27 Oct 2021 15:17:17 -0700 Subject: [PATCH 3/5] mannually add timeout and retry --- .github/workflows/link_check.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index ab4ba6abfb21..7955562c5244 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -64,12 +64,19 @@ jobs: python -m pip install --user -e python - name: Link Check - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - retry_on: timeout - comand: | + run: | + for run in {1..3} + do cd docs/python_docs/python make clean - make linkcheck EVAL=0 + timeout 10 make linkcheck EVAL=0 + if [[ $? -eq 0 ]] + then + break + else + if [[ run -eq 3 ]] + then + exit 1 + fi + fi + done From 5abf4e937d5b1ead3ac83744e7c393618175546d Mon Sep 17 00:00:00 2001 From: barry-jin Date: Wed, 27 Oct 2021 15:20:08 -0700 Subject: [PATCH 4/5] update --- .github/workflows/link_check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index 7955562c5244..ebeb2acda3b5 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -64,8 +64,10 @@ jobs: python -m pip install --user -e python - name: Link Check + env: + MAX_RETRY: 3 run: | - for run in {1..3} + for run in {1..$MAX_RETRY} do cd docs/python_docs/python make clean @@ -74,7 +76,7 @@ jobs: then break else - if [[ run -eq 3 ]] + if [[ run -eq $MAX_RETRY ]] then exit 1 fi From 0cbb61196160378f14fb84706679fa978b6b5dee Mon Sep 17 00:00:00 2001 From: barry-jin Date: Wed, 27 Oct 2021 17:23:41 -0700 Subject: [PATCH 5/5] fix --- .github/workflows/link_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml index ebeb2acda3b5..e405958e24a4 100644 --- a/.github/workflows/link_check.yml +++ b/.github/workflows/link_check.yml @@ -71,7 +71,7 @@ jobs: do cd docs/python_docs/python make clean - timeout 10 make linkcheck EVAL=0 + timeout 10m make linkcheck EVAL=0 if [[ $? -eq 0 ]] then break