Loading
Remove unused constant RESPAWN_WAIT_TIME
Summary
Removes the unused constant RESPAWN_WAIT_TIME from app/services/ci/resource_groups/assign_resource_from_resource_group_service.rb.
The constant was defined (RESPAWN_WAIT_TIME = 1.minute) but never referenced anywhere in the codebase.
Related to #542966 (closed)
Verification
This constant was verified as unused by:
-
keela --type constantsflagged it as unused - Grep search found no callers (bare
RESPAWN_WAIT_TIMEand all qualified forms) anywhere inapp/,lib/,ee/,spec/,config/, i18n, or JS; only the definition and the keela baseline entry matched - No dynamic access (
const_get,const_defined?,send, or string-built name) - No inheritance or mixin path (the class is a leaf,
< ::BaseService, with no subclasses referencing it unqualified) - No re-export/alias, and no use in
case/when,rescue, default arguments, or class-level DSL
Cascade Removals
None - this was a standalone removal.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 50.7 | 49.4 | -1.3 (2.6%) |
| Constant flog score | 1.3 | N/A | -1.3 removed |
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | unchanged | unchanged | 0.0 (no spec block referenced the constant) |
| Spec block flog score | N/A | N/A | 0.0 removed |
Combined Flog Summary
| File | Flog Removed |
|---|---|
app/services/ci/resource_groups/assign_resource_from_resource_group_service.rb |
1.3 |
| (no spec file changes) | 0.0 |
| Total | 1.3 |
Test Suite Impact
- Specs removed: 0 examples (no spec referenced the constant)
- Spec file: n/a (unchanged)
- Time saved per run: 0.00 seconds
Estimated CI Savings
| Estimate | Pipelines/Month | Time Saved | Cost Saved/Month | Cost Saved/Year |
|---|---|---|---|---|
| Pessimistic | 15,000 | 0.00 hrs/month | $0.00 | $0.00 |
| Moderate | 30,000 | 0.00 hrs/month | $0.00 | $0.00 |
| Optimistic | 50,000 | 0.00 hrs/month | $0.00 | $0.00 |
Based on 0.00 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes). No specs referenced this constant, so there is no per-pipeline runtime savings; the benefit is reduced code complexity and a smaller keela baseline.
Files Modified
app/services/ci/resource_groups/assign_resource_from_resource_group_service.rb(constant removed - 2 lines: the definition and its trailing blank line)scripts/lint/keela_baseline.yml(entry removed - 2 lines)
Related
- Related to #542966 (closed) (Improve unused code removal workflow)
- Part of dead code cleanup effort
- Constant was listed in
scripts/lint/keela_baseline.yml