From a5da38a95b3c5bed8cfc1deb1cc4c19973e13156 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 20 Feb 2025 16:07:42 +0000 Subject: [PATCH 1/2] Add timeouts to all GitHub jobs --- .github/workflows/contributed-recipes.yml | 2 ++ .../workflows/docker-build-test-upload.yml | 5 ++++ .github/workflows/docker-merge-tags.yml | 5 ++++ .github/workflows/docker-tag-push.yml | 5 ++++ .github/workflows/docker-wiki-update.yml | 1 + .github/workflows/docker.yml | 27 +++++++++++++++++++ .github/workflows/pre-commit.yml | 1 + .github/workflows/registry-move.yml | 1 + .github/workflows/registry-overviews.yml | 1 + .github/workflows/sphinx.yml | 5 ++-- 10 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/contributed-recipes.yml b/.github/workflows/contributed-recipes.yml index 890aa324f5..613c20bdef 100644 --- a/.github/workflows/contributed-recipes.yml +++ b/.github/workflows/contributed-recipes.yml @@ -29,6 +29,7 @@ on: jobs: generate-matrix: runs-on: ubuntu-24.04 + timeout-minutes: 1 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: @@ -43,6 +44,7 @@ jobs: test-recipes: runs-on: ${{ matrix.runs-on }} + timeout-minutes: 5 needs: generate-matrix if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index 39103e39e0..faec1c7bc3 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -33,10 +33,15 @@ on: description: GitHub Actions Runner image required: true type: string + timeout-minutes: + description: Timeout in minutes + required: true + type: number jobs: build-test-upload: runs-on: ${{ inputs.runs-on }} + timeout-minutes: ${{ inputs.timeout-minutes }} steps: - name: Checkout Repo ⚡️ diff --git a/.github/workflows/docker-merge-tags.yml b/.github/workflows/docker-merge-tags.yml index 22fa85ace9..95db765aac 100644 --- a/.github/workflows/docker-merge-tags.yml +++ b/.github/workflows/docker-merge-tags.yml @@ -15,6 +15,10 @@ on: description: Image name required: true type: string + timeout-minutes: + description: Timeout in minutes + type: number + default: 20 secrets: REGISTRY_USERNAME: required: true @@ -24,6 +28,7 @@ on: jobs: merge-tags: runs-on: ubuntu-24.04 + timeout-minutes: ${{ inputs.timeout-minutes }} steps: - name: Checkout Repo ⚡️ diff --git a/.github/workflows/docker-tag-push.yml b/.github/workflows/docker-tag-push.yml index 4f11c46bd1..2762cf557f 100644 --- a/.github/workflows/docker-tag-push.yml +++ b/.github/workflows/docker-tag-push.yml @@ -20,6 +20,10 @@ on: description: Variant tag prefix required: true type: string + timeout-minutes: + description: Timeout in minutes + default: 20 + type: number secrets: REGISTRY_USERNAME: required: true @@ -29,6 +33,7 @@ on: jobs: tag-push: runs-on: ubuntu-24.04 + timeout-minutes: ${{ inputs.timeout-minutes }} steps: - name: Checkout Repo ⚡️ diff --git a/.github/workflows/docker-wiki-update.yml b/.github/workflows/docker-wiki-update.yml index 9c0b169c03..82cf82711f 100644 --- a/.github/workflows/docker-wiki-update.yml +++ b/.github/workflows/docker-wiki-update.yml @@ -11,6 +11,7 @@ on: jobs: wiki-update: runs-on: ubuntu-24.04 + timeout-minutes: 1 steps: - name: Checkout Repo ⚡️ diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9abd181acc..98693807fd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -67,6 +67,7 @@ jobs: image: docker-stacks-foundation platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 10 x86_64-foundation: uses: ./.github/workflows/docker-build-test-upload.yml @@ -75,6 +76,7 @@ jobs: image: docker-stacks-foundation platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 10 aarch64-base: uses: ./.github/workflows/docker-build-test-upload.yml @@ -83,6 +85,7 @@ jobs: image: base-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 15 needs: [aarch64-foundation] x86_64-base: @@ -92,6 +95,7 @@ jobs: image: base-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-foundation] aarch64-minimal: @@ -101,6 +105,7 @@ jobs: image: minimal-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 15 needs: [aarch64-base] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -111,6 +116,7 @@ jobs: image: minimal-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-base] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -121,6 +127,7 @@ jobs: image: scipy-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 15 needs: [aarch64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -131,6 +138,7 @@ jobs: image: scipy-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -141,6 +149,7 @@ jobs: image: r-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 15 needs: [aarch64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -151,6 +160,7 @@ jobs: image: r-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -161,6 +171,8 @@ jobs: image: julia-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + # This workflow sometimes takes quite long to build + timeout-minutes: 30 needs: [aarch64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -171,6 +183,7 @@ jobs: image: julia-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 20 needs: [x86_64-minimal] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -181,6 +194,7 @@ jobs: image: tensorflow-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 15 needs: [aarch64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -191,6 +205,7 @@ jobs: image: tensorflow-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -202,6 +217,7 @@ jobs: variant: cuda platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 20 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -212,6 +228,7 @@ jobs: image: pytorch-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 20 needs: [aarch64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -222,6 +239,7 @@ jobs: image: pytorch-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 20 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -233,6 +251,7 @@ jobs: variant: cuda11 platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 20 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -244,6 +263,7 @@ jobs: variant: cuda12 platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 20 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -254,6 +274,8 @@ jobs: image: datascience-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + # This workflow sometimes takes quite long to build + timeout-minutes: 30 needs: [aarch64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -264,6 +286,7 @@ jobs: image: datascience-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 25 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -274,6 +297,7 @@ jobs: image: pyspark-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 20 needs: [aarch64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -284,6 +308,7 @@ jobs: image: pyspark-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-scipy] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -294,6 +319,7 @@ jobs: image: all-spark-notebook platform: aarch64 runs-on: ubuntu-24.04-arm + timeout-minutes: 20 needs: [aarch64-pyspark] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} @@ -304,6 +330,7 @@ jobs: image: all-spark-notebook platform: x86_64 runs-on: ubuntu-24.04 + timeout-minutes: 15 needs: [x86_64-pyspark] if: ${{ !contains(github.event.pull_request.title, '[FAST_BUILD]') }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 76f381324f..9be792d5e2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,6 +13,7 @@ permissions: jobs: run-hooks: runs-on: ubuntu-24.04 + timeout-minutes: 5 steps: - name: Checkout Repo ⚡️ diff --git a/.github/workflows/registry-move.yml b/.github/workflows/registry-move.yml index 9e66eede9c..6543ac2fc5 100644 --- a/.github/workflows/registry-move.yml +++ b/.github/workflows/registry-move.yml @@ -19,6 +19,7 @@ jobs: update-overview: # To be able to use the latest skopeo runs-on: macos-latest + timeout-minutes: 5 if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' steps: diff --git a/.github/workflows/registry-overviews.yml b/.github/workflows/registry-overviews.yml index 7fe9671df8..f8de492349 100644 --- a/.github/workflows/registry-overviews.yml +++ b/.github/workflows/registry-overviews.yml @@ -16,6 +16,7 @@ on: jobs: update-overview: runs-on: ubuntu-24.04 + timeout-minutes: 1 if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' steps: diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 63f443697f..ad314b8592 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -24,10 +24,11 @@ on: jobs: build-docs: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' || github.event_name != 'schedule' permissions: contents: write - if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' || github.event_name != 'schedule' - runs-on: ubuntu-24.04 steps: - name: Checkout Repo ⚡️ From 75b8e7ef98a39f102369a1b101eccf093c17c454 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 20 Feb 2025 16:11:29 +0000 Subject: [PATCH 2/2] Increase merge and push timeouts --- .github/workflows/docker-merge-tags.yml | 2 +- .github/workflows/docker-tag-push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-merge-tags.yml b/.github/workflows/docker-merge-tags.yml index 95db765aac..125194731e 100644 --- a/.github/workflows/docker-merge-tags.yml +++ b/.github/workflows/docker-merge-tags.yml @@ -18,7 +18,7 @@ on: timeout-minutes: description: Timeout in minutes type: number - default: 20 + default: 25 secrets: REGISTRY_USERNAME: required: true diff --git a/.github/workflows/docker-tag-push.yml b/.github/workflows/docker-tag-push.yml index 2762cf557f..a53ccf1933 100644 --- a/.github/workflows/docker-tag-push.yml +++ b/.github/workflows/docker-tag-push.yml @@ -22,7 +22,7 @@ on: type: string timeout-minutes: description: Timeout in minutes - default: 20 + default: 25 type: number secrets: REGISTRY_USERNAME: