[feature] Granular timeout management
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reviewing the GitHub Actions job steps and the linked debug-timeout-minutes-steps-gha-test experiment. Compare tox's --exit-and-dump-after and possible --fail-fast behavior with step-level timeout-minutes, along with the mentioned pytest, ansible-test, CPython, and faulthandler options. Done means proposing a clear timeout interface and identifying how callers can override defaults.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The current timeout strategy is bound to the overall job duration, which is problematic in cases when we can know early that it is doomed to fail but still proceed with running it.
For example, when a job is cancelled because another matrix job fails, it goes into the rerun mode which buys it 5 minutes of overtime (due to how GH handles cancellations).
Another example is when third party dependencies like PPA are flaky or down. The test dep installation can make the overall job duration longer, thus increasing a chance of hitting the timeout and having the GHA platform killing the job close to its completion. Even if it would've succeeded otherwise.
So we likely need to integrate tox's --exit-and-dump-after (and possibly --fail-fast). And maybe encourage the use of similar features in pytest. ansible-test and CPython's test runners also have features of controlled timeouts. Plus there's faulthandler that can dump current traces, worth mentioning.
Back to GHA's timeouts. I think, we should explore step-level timeouts. We would be able to catch certain parts of jobs getting out of line more predictably, but it's unclear what the interface could be for the callers to override the defaults.
I've tested in https://github.com/webknjaz/debug-timeout-minutes-steps-gha-test/actions/runs/37228799583/job/111513907748 that it's possible to set timeout-minutes for steps dynamically, computed earlier in the job as follows:
jobs:
build:
runs-on: ubuntu-24.04-arm
steps:
- name: Compute step timeouts
id: timer-values
run: |-
echo val1=1 >> "${GITHUB_OUTPUT}"
echo val2=2 >> "${GITHUB_OUTPUT}"
- name: SHOULD stop after a minute
if: always()
run: sleep 300
timeout-minutes: ${{ fromJSON(steps.timer-values.outputs.val1) }}
- name: SHOULD stop after two minutes
if: always()
run: sleep 300
timeout-minutes: ${{ fromJSON(steps.timer-values.outputs.val2) }}
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 6
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tox-dev/workflow
-
[idea] Arbitrary secret passingĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
enhancement help wanted question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của tox-dev/workflow
Issue tương tự
-
bug llm-stack needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area needs-kind needs-priority needs-status needs-triage
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
cncf/automation#736 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Q-target size/S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
chore medium Tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
stuttgart-things/blueprints#217 ·
Maintainer thường phản hồi trong vòng 1 ngày