Loading
Remove unused scope PagesDomain.instance_serverless
Summary
Removes the unused scope PagesDomain.instance_serverless from app/models/pages_domain.rb.
The scope filtered on usage: :serverless, relating to the removed GitLab Serverless feature, and had no production callers anywhere in the codebase.
Related to #542966 (closed)
Verification
This scope was verified as unused by:
-
keela --type scopesflagged it as unused - Grep search found no callers (
app/,lib/,ee/,config/) - Not used in scope chaining
- Not used in
merge()calls - Not used as
default_scopeor association scope
Additional checks: no dynamic dispatch (send/public_send/:instance_serverless symbol references), and the only reference was the scope's own dedicated spec block. The :instance_serverless factory trait is a separate construct still used by other specs and was intentionally left untouched.
Cascade Removals
None - this was a standalone removal.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 326.0 | 323.3 | -2.7 (0.8%) |
| Scope flog score | 2.7 | N/A | -2.7 removed |
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | 1176.4 | 1146.8 | -29.6 (2.5%) |
| Spec block flog score | 29.6 | N/A | -29.6 removed |
Test Suite Impact
- Specs removed: 1 example
- Spec file:
spec/models/pages_domain_spec.rb - Time saved per run: 0.04738 seconds
Estimated CI Savings
| Estimate | Pipelines/Month | Time Saved | Cost Saved/Month | Cost Saved/Year |
|---|---|---|---|---|
| Pessimistic | 15,000 | 0.20 hrs/month | $0.36 | $4.26 |
| Moderate | 30,000 | 0.39 hrs/month | $0.71 | $8.53 |
| Optimistic | 50,000 | 0.66 hrs/month | $1.18 | $14.21 |
Based on 0.04738 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes)
Files Modified
app/models/pages_domain.rb(scope removed - 2 lines)spec/models/pages_domain_spec.rb(specs removed - 14 lines, 1 example)scripts/lint/keela_baseline.yml(entry removed - 2 lines)
Related
- Related to #542966 (closed) (Improve unused helper methods workflow)
- Part of dead code cleanup effort
- Scope was listed in
scripts/lint/keela_baseline.yml