Skip to content

ci: add timeout-minutes to all jobs in functions.yaml#3535

Open
Ankitsinghsisodya wants to merge 1 commit intoknative:mainfrom
Ankitsinghsisodya:ci/add-timeout-minutes-functions-workflow
Open

ci: add timeout-minutes to all jobs in functions.yaml#3535
Ankitsinghsisodya wants to merge 1 commit intoknative:mainfrom
Ankitsinghsisodya:ci/add-timeout-minutes-functions-workflow

Conversation

@Ankitsinghsisodya
Copy link
Copy Markdown

Summary

  • Adds timeout-minutes to all 11 jobs in .github/workflows/functions.yaml
  • Without explicit timeouts, GitHub Actions defaults to 6 hours per job; a hung cluster or stuck step would burn runner minutes until the default limit

Timeouts set:

Job Timeout
precheck 15m
test-unit 30m
test-templates 60m
test-integration 120m
test-e2e 120m
test-e2e-podman 120m
test-e2e-runtimes 90m
test-e2e-config-ci 120m
build 30m
publish-utils-image 30m
publish-image 30m

These are conservative upper bounds — happy to adjust based on observed p99 runtimes.

Test plan

  • Confirm no jobs time out prematurely on a normal PR run

Fixes #3530

Without explicit timeouts, GitHub Actions defaults to 6 hours per job.
Add job-level timeouts based on expected runtimes to prevent hung jobs
from consuming CI minutes unnecessarily:

- precheck:             15m
- test-unit:            30m
- test-templates:       60m
- test-integration:    120m
- test-e2e:            120m
- test-e2e-podman:     120m
- test-e2e-runtimes:    90m
- test-e2e-config-ci:  120m
- build:                30m
- publish-utils-image:  30m
- publish-image:        30m

Fixes knative#3530
Copilot AI review requested due to automatic review settings March 27, 2026 19:38
@knative-prow knative-prow bot requested review from dsimansk and jrangelramos March 27, 2026 19:38
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Mar 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ankitsinghsisodya
Once this PR has been reviewed and has the lgtm label, please assign lkingland for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 27, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Ankitsinghsisodya / name: Ankit sisodya (80e7560)

@knative-prow knative-prow bot added size/S 🤖 PR changes 10-29 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Mar 27, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Mar 27, 2026

Hi @Ankitsinghsisodya. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit GitHub Actions job timeouts to .github/workflows/functions.yaml to prevent hung/stuck CI jobs from consuming runner minutes up to the default 6-hour limit.

Changes:

  • Set timeout-minutes for all jobs in functions.yaml (precheck, tests, build, publish).
  • Establish conservative upper bounds per job category (unit/templates vs. integration/e2e vs. build/publish).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -248,6 +253,7 @@ jobs:
name: E2E - Podman
needs: precheck
runs-on: ubuntu-latest
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test-e2e-podman defines a strategy.matrix.os, but runs-on is hardcoded to ubuntu-latest, so both matrix entries run on the same runner label. This likely defeats the intent of testing on ARM (ubuntu-24.04-arm) and also duplicates CI work. Consider changing runs-on to use matrix.os (or removing the matrix if only one runner is intended).

Suggested change
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — this is a pre-existing issue in the workflow, not introduced by this PR. The test-e2e-podman job hardcodes runs-on: ubuntu-latest while defining a matrix with both ubuntu-latest and ubuntu-24.04-arm, so both matrix entries run on the same x86_64 runner. This should be fixed separately. I'll keep this PR scoped to adding timeout-minutes only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test 🤖 Needs an org member to approve testing size/S 🤖 PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add timeout-minutes to all jobs in functions.yaml

2 participants