Skip to content

Add missing timeout configurations to CI workflows#2397

Open
mr-raj12 wants to merge 1 commit intoborgbase:masterfrom
mr-raj12:fix/add-ci-timeout-configs-2396
Open

Add missing timeout configurations to CI workflows#2397
mr-raj12 wants to merge 1 commit intoborgbase:masterfrom
mr-raj12:fix/add-ci-timeout-configs-2396

Conversation

@mr-raj12
Copy link
Contributor

@mr-raj12 mr-raj12 commented Feb 7, 2026

Description

This PR adds timeout configurations to CI workflow jobs that were missing them, preventing potential indefinite hangs and wasted runner resources.

Changes:

  • Added timeout-minutes: 15 to lint job (test.yml:21)
  • Added timeout-minutes: 5 to prepare-matrix job (test.yml:36)
  • Added timeout-minutes: 60 to both tmate debug steps (test.yml:85, 133)

Related Issue

Fixes #2396

Motivation and Context

Without proper timeout configurations, GitHub Actions jobs default to 360 minutes (6 hours). If a job hangs due to network issues, stuck processes, or forgotten debug sessions, it wastes CI runner resources and delays feedback to contributors.

While PR #2353 addressed test-level hangs through comprehensive mocking, this PR adds workflow-level timeout protections as a defense-in-depth measure.

The chosen timeout values provide generous buffers for legitimate slow runs while preventing excessive resource consumption:

  • Lint typically completes in <2 minutes, 15-minute timeout allows for slow runners
  • Matrix generation is a simple script (<1 minute), 5 minutes is more than sufficient
  • Debug sessions get 60 minutes instead of potentially hanging for 6 hours

How Has This Been Tested?

  • ✅ YAML syntax validated with Python's yaml.safe_load()
  • ✅ Workflow structure verified with gh workflow view
  • ✅ All 6 timeout configurations confirmed in place (3 new + 3 existing)
  • ✅ File changes reviewed: only 4 lines added to .github/workflows/test.yml

The timeouts themselves will be validated when CI runs on this PR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

Fixes borgbase#2396

- Add 15-minute timeout to lint job
- Add 5-minute timeout to prepare-matrix job
- Add 60-minute timeout to tmate debug steps

Without proper timeouts, jobs default to 360 minutes and can waste
CI runner resources if they hang. These timeouts prevent indefinite
hangs while providing sufficient buffer for legitimate slow runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing timeout configurations to CI workflows

1 participant