From fd14399145fd47a0f958e324105c9a85cd607d0d Mon Sep 17 00:00:00 2001 From: cobalt-github-releaser-bot <95661244+cobalt-github-releaser-bot@users.noreply.github.com> Date: Fri, 31 May 2024 18:49:50 -0700 Subject: [PATCH] Cherry pick PR #3413: Set Github Actions build job timeouts (#3419) Refer to the original PR: https://github.com/youtube/cobalt/pull/3413 Adds default timeouts for build jobs, to prevent hang bugs from consuming all resources. b/343787224 Co-authored-by: Kaido Kert --- .github/workflows/main.yaml | 5 +++++ .github/workflows/main_win.yaml | 4 ++++ .github/workflows/pytest_25.lts.1+.yaml | 1 + 3 files changed, 10 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d5e1c15b2bac..71b6278e1de0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -74,6 +74,7 @@ jobs: github.event.label.name == 'runtest' || github.event.label.name == 'on_device' ) + timeout-minutes: 10 steps: - id: checkout uses: kaidokert/checkout@v3.5.999 @@ -148,6 +149,7 @@ jobs: runs-on: [self-hosted, linux-runner] permissions: packages: write + timeout-minutes: 30 steps: - name: Checkout files uses: kaidokert/checkout@v3.5.999 @@ -184,6 +186,7 @@ jobs: permissions: packages: write runs-on: [self-hosted, linux-runner] + timeout-minutes: 30 steps: - name: Checkout files uses: kaidokert/checkout@v3.5.999 @@ -231,6 +234,7 @@ jobs: # However, dind container ends up having / folder mounted on overlay # filesystem, whereas /__w which contains Cobalt source code is on tmpfs. TMPDIR: /__w/_temp + timeout-minutes: 60 steps: - name: Checkout uses: kaidokert/checkout@v3.5.999 @@ -367,6 +371,7 @@ jobs: HOME: /root COBALT_EVERGREEN_LOADER: ${{needs.initialize.outputs.evergreen_loader}} MODULAR_BUILD: ${{ inputs.modular && 1 || 0 }} + timeout-minutes: 90 steps: - name: Checkout uses: kaidokert/checkout@v3.5.999 diff --git a/.github/workflows/main_win.yaml b/.github/workflows/main_win.yaml index 146424bc2b74..d3ac0cfcb17e 100644 --- a/.github/workflows/main_win.yaml +++ b/.github/workflows/main_win.yaml @@ -61,6 +61,7 @@ jobs: github.event.label.name == 'runtest' || github.event.label.name == 'on_device' ) + timeout-minutes: 10 steps: - id: Checkout uses: kaidokert/checkout@v3.5.999 # Temporary version @@ -133,6 +134,7 @@ jobs: permissions: packages: write runs-on: windows-2019 + timeout-minutes: 120 steps: - name: Checkout files uses: kaidokert/checkout@v3.5.999 @@ -167,6 +169,7 @@ jobs: platform: ${{ fromJson(needs.initialize.outputs.platforms) }} include: ${{ fromJson(needs.initialize.outputs.includes) }} config: [devel, debug, qa, gold] + timeout-minutes: 90 steps: - name: Checkout uses: kaidokert/checkout@v3.5.999 @@ -204,6 +207,7 @@ jobs: include: ${{ fromJson(needs.initialize.outputs.includes) }} env: MODULAR_BUILD: ${{ inputs.modular && 1 || 0 }} + timeout-minutes: 90 steps: - name: Checkout uses: kaidokert/checkout@v3.5.999 diff --git a/.github/workflows/pytest_25.lts.1+.yaml b/.github/workflows/pytest_25.lts.1+.yaml index 0951c7d8cbfb..87b4b58d306a 100644 --- a/.github/workflows/pytest_25.lts.1+.yaml +++ b/.github/workflows/pytest_25.lts.1+.yaml @@ -20,6 +20,7 @@ jobs: python-version: ['3.8', '3.11'] fail-fast: false runs-on: ${{ matrix.os }} + timeout-minutes: 15 steps: - name: Checkout uses: kaidokert/checkout@v3.5.999