GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a timeout to CI builds · Issue #103180 · python/cpython

Add a timeout to CI builds #103180

New issue
Copy link
New issue
Copy link
Closed
Closed
Add a timeout to CI builds#103180
Copy link
Assignees
sobolevn
Labels
buildThe build process and cross-buildThe build process and cross-build

Description

@JelleZijlstra
JelleZijlstra
opened on Apr 2, 2023
Issue body actions

The joke PR #103178 included some very slow code that runs at import time, and CI took >3 hours before I canceled it. This wastes resources and is a possible abuse vector; a malicious actor could use it to eat up our CI resource quota. We should have some reasonable timeout (1 hour?) for all CI builds.

Linked PRs

  • gh-103180: Add CI timeouts to all GitHub Actions jobs #103437
  • [3.11] gh-103180: Add CI timeouts to all GitHub Actions jobs (GH-103437). #103543
  • GH-103180: Set a timeout for every job in GitHub Actions #130375
  • [3.13] GH-103180: Set a timeout for every job in GitHub Actions (GH-130375) #130431
  • [3.12] GH-103180: Set a timeout for every job in GitHub Actions (GH-130375) #130432
Reacted by Alex Waygood and Charlie Zhao

Activity

  1. JelleZijlstra
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Apr 2, 2023
  2. kylehofmann commented on Apr 2, 2023

    @kylehofmann
    kylehofmann
    on Apr 2, 2023
    More actions

    I would like to publicly apologize for the PR. It didn't turn out the way I had intended.

    Reacted by Alex Waygood
  3. JelleZijlstra commented on Apr 2, 2023

    @JelleZijlstra
    JelleZijlstra
    on Apr 2, 2023
    MemberAuthor
    More actions

    No apology necessary, it's better that we find out about this problem through a well-intentioned joke.

    I was actually surprised when I saw the PR that it showed you as a first-time contributor here. Based on the level of your contributions on the Python Discord, I'm sure there's lots of useful work you could do on CPython if you are so inclined. Perhaps your next PR will be less quadratic. (And if you're not interested or don't have time, that's perfectly fine too, of course.)

  4. arhadthedev commented on Apr 2, 2023

    @arhadthedev
    arhadthedev
    on Apr 2, 2023
    Member
    More actions

    Related issue (for the build step only): gh-90361.

  5. sobolevn commented on Apr 11, 2023

    @sobolevn
    sobolevn
    on Apr 11, 2023
    Member
    More actions

    I had some time to look at this. I think that we need to base timeouts:

    1. For short actions, like stale and labels
    2. For build / test actions

    Short timeout

    stale takes ~1m average to finish:
    Снимок экрана 2023-04-11 в 12 10 11

    new-bugs-notifier takes several seconds:
    Снимок экрана 2023-04-11 в 12 11 46

    check-labels also takes several seconds:
    Снимок экрана 2023-04-11 в 12 12 27

    verify-ensurepip-wheels takes several seconds:
    Снимок экрана 2023-04-11 в 12 13 34

    project-updater takes several seconds as well:
    Снимок экрана 2023-04-11 в 12 15 02

    I think that 10 minutes as a timeout is a reasonable number for this group.
    It will allow quite some performance degradation, but still keep our resources under controll.

    Slow actions

    docs can work from 10m up to 20m:
    Снимок экрана 2023-04-11 в 12 17 05

    testsmsi can take from several minutes up to 20m:
    Снимок экрана 2023-04-11 в 12 18 26

    build takes around 30m:
    Снимок экрана 2023-04-11 в 12 19 24

    So, using 1h is a resonable timeout.

    I will send a PR with these timeouts in a moment.
    Plus, I will change per-step timeouts from #90361 to be job-level (and increase them).

    Reacted by sunmy2019 and Kyle Hofmann
  6. sobolevn
    added a commit that references this issue on Apr 11, 2023

    pythongh-103180: Add CI timeouts to all GtiHub Actions jobs

    66f638f
  7. sobolevn
    self-assigned this
    on Apr 11, 2023
  8. hugovk
    added a commit that references this issue on Apr 14, 2023

    gh-103180: Add CI timeouts to all GitHub Actions jobs (#103437)

    be8903e
  9. carljm
    added a commit that references this issue on Apr 14, 2023

    Merge branch 'main' into superopt

    64da49f
  10. sobolevn
    added a commit that references this issue on Apr 14, 2023

    [3.11] pythongh-103180: Add CI timeouts to all GitHub Actions jobs (p…

    f7e8ca1
  11. carljm
    added a commit that references this issue on Apr 14, 2023

    Merge branch 'superopt' into superopt_spec

    b73cff0
  12. hugovk
    added a commit that references this issue on Apr 15, 2023

    [3.11] gh-103180: Add CI timeouts to all GitHub Actions jobs (GH-103437…

    a3242c7
  13. hauntsaninja commented on Apr 26, 2023

    @hauntsaninja
    hauntsaninja
    on Apr 26, 2023
    Contributor
    More actions

    Looks like this was completed, thanks all!

  14. hauntsaninja
    closed this as completedon Apr 26, 2023
  15. hugovk
    added a commit that references this issue on Feb 21, 2025

    GH-103180: Set a timeout for every job in GitHub Actions (#130375)

    d0a1e5c
  16. AA-Turner
    added 4 commits that reference this issue on Feb 22, 2025

    [3.13] pythonGH-103180: Set a timeout for every job in GitHub Actions (…

    06ecbf1

    [3.12] pythonGH-103180: Set a timeout for every job in GitHub Actions (…

    1c3e33c

    [3.12] GH-103180: Set a timeout for every job in GitHub Actions (GH-1…

    59c3eb4

    [3.13] GH-103180: Set a timeout for every job in GitHub Actions (GH-1…

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

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

buildThe build process and cross-buildThe build process and cross-build

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.