fix: enforce job.<job-id>.timeout-minutes #982

Merged
earl-warren merged 1 commit from earl-warren/runner:wip-timeout into main 2025-09-11 14:43:27 +00:00
Owner
  • enforce timeout-minutes timeout for jobs in a way similar to how it is done for steps
  • minimal refactor of evaluateStepTimeout evaluateTimeout so it can be used by jobs as well, with additional debug information and error logging if parsing fails
  • add integration tests for both step and job timeout-minutes, verifying expressions are allowed and evaluated

Resolves forgejo/runner#979


Manually verified to work as expected https://v13.next.forgejo.org/earl-warren/testtimeout-minutes/actions/runs/3/jobs/0/attempt/1

on: [push]
jobs:
  test:
    runs-on: docker
    timeout-minutes: 1
    steps:
      - run: |
          set -x
          while : ; do
            sleep 30
          done

image

  • bug fixes
    • PR: fix: enforce job..timeout-minutes
- enforce timeout-minutes timeout for jobs in a way similar to how it is done for steps - minimal refactor of evaluateStepTimeout evaluateTimeout so it can be used by jobs as well, with additional debug information and error logging if parsing fails - add integration tests for both step and job timeout-minutes, verifying expressions are allowed and evaluated Resolves forgejo/runner#979 --- Manually verified to work as expected https://v13.next.forgejo.org/earl-warren/testtimeout-minutes/actions/runs/3/jobs/0/attempt/1 ```yaml on: [push] jobs: test: runs-on: docker timeout-minutes: 1 steps: - run: | set -x while : ; do sleep 30 done ``` ![image](/attachments/047ddd15-7109-4931-a6ed-43073e4d31f9) <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/982): <!--number 982 --><!--line 0 --><!--description Zml4OiBlbmZvcmNlIGpvYi48am9iLWlkPi50aW1lb3V0LW1pbnV0ZXM=-->fix: enforce job.<job-id>.timeout-minutes<!--description--> <!--end release-notes-assistant-->
112 KiB
earl-warren changed title from fix: enforce job.<id>.timeout-minutes to WIP: fix: enforce job.<id>.timeout-minutes 2025-09-11 06:53:54 +00:00
viceice approved these changes 2025-09-11 07:37:16 +00:00
Dismissed
Contributor

cascading-pr updated at actions/setup-forgejo#675

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/675
Author
Owner

@cascading-pr wrote in #982 (comment):

cascading-pr updated at actions/setup-forgejo#675

Pass. So ... this does not break anything obvious at least.

@cascading-pr wrote in https://code.forgejo.org/forgejo/runner/pulls/982#issuecomment-59610: > cascading-pr updated at actions/setup-forgejo#675 Pass. So ... this does not break anything obvious at least.
earl-warren force-pushed wip-timeout from 4d669faf78
Some checks failed
checks / validate mocks (pull_request) Successful in 23s
checks / build and test (pull_request) Successful in 46s
checks / runner exec tests (pull_request) Successful in 25s
checks / runner integration tests (pull_request) Successful in 3m1s
checks / integration tests (pull_request) Failing after 9m50s
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 31m0s
issue-labels / release-notes (pull_request_target) Successful in 5s
to a100041dd4
All checks were successful
checks / validate mocks (pull_request) Successful in 23s
checks / build and test (pull_request) Successful in 44s
checks / runner exec tests (pull_request) Successful in 24s
checks / runner integration tests (pull_request) Successful in 2m57s
checks / integration tests (pull_request) Successful in 11m2s
issue-labels / release-notes (pull_request_target) Successful in 5s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 11s
cascade / forgejo (pull_request_target) Successful in 2m21s
2025-09-11 09:17:05 +00:00
Compare
earl-warren changed title from WIP: fix: enforce job.<id>.timeout-minutes to fix: enforce job.<id>.timeout-minutes 2025-09-11 09:24:29 +00:00
viceice approved these changes 2025-09-11 09:27:36 +00:00
earl-warren changed title from fix: enforce job.<id>.timeout-minutes to fix: enforce job.<job-id>.timeout-minutes 2025-09-11 09:43:49 +00:00
mfenniak approved these changes 2025-09-11 14:08:18 +00:00
earl-warren deleted branch wip-timeout 2025-09-11 14:43:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!982
No description provided.