Job timeout risk: spec/models/repository_spec.rb ran much longer than expected
Why was this issue created?
spec/models/repository_spec.rb was reported to have:
- exceeded Knapsack's expected runtime by at least 50%, and
- been identified as a notable pipeline bottleneck and a job timeout risk
Suggested steps for investigation
- To reproduce in CI by running test files in the same order, you can follow the steps listed here.
- Identify if a specific test case is stalling the run time. Hint: You can search the job's log for
Starting example group spec/models/repository_spec.rband view the elapsed time after each test case in the proceeding lines starting with[RSpecRunTime]. - If the test file is large, consider refactoring it into multiple files to allow better test parallelization across runners.
- If the run time cannot be fixed in time, consider quarantine the spec(s) to restore performance.
Run time details
- Reported from pipeline 3275175 created at
2024-10-04T01:15:53Z
| Field | Value |
|---|---|
| Job URL | rspec-unit-pg14-single-db-ci-connection-27-44 |
| Job total RSpec suite run time | expected: 45 minutes 51.74 seconds, actual: 72 minutes 43.86 seconds
|
| Spec file run time | expected: 6 minutes 36.7 seconds, actual: 11 minutes 56.25 seconds
|
| Spec file weight |
16.41% of total suite run time |
- Reported from pipeline 5002788 created at
2025-12-18T00:06:13Z
| Field | Value |
|---|---|
| Job URL | rspec-unit-pg16-43-44 |
| Job total RSpec suite run time | expected: 32 minutes 46.9 seconds, actual: 72 minutes 14.05 seconds
|
| Spec file run time | expected: 4 minutes 1.25 seconds, actual: 11 minutes 32.85 seconds
|
| Spec file weight |
15.99% of total suite run time |
Edited by KNAPSACK_REPORT_ISSUES_PROJECT_TOKEN