-
Notifications
You must be signed in to change notification settings - Fork 296
Description
Objective
Reduce the frequency of hourly maintenance workflows (Hourly CI Cleaner and Tidy) that are running excessively, saving ~$70/month.
Context
Two maintenance workflows are running ~19-20 times/day when less frequent execution would be sufficient:
- Hourly CI Cleaner: 19 runs/day, $38.30/month, 42 missing tool errors
- Tidy: 20 runs/day, $40.32/month, 19 missing tool errors
Both workflows also have missing tool errors that should be investigated.
Changes Required
1. Hourly CI Cleaner
File: .github/workflows/hourly-ci-cleaner.md
Schedule Change: 19 runs/day → 2 runs/day
on:
schedule:
- cron: '0 6,18 * * *' # Twice daily (6am, 6pm)Missing Tool Errors: 42 instances - investigate what tools are missing
Savings: ~$34/month
2. Tidy
File: .github/workflows/tidy.md
Schedule Change: 20 runs/day → 1 run/day
on:
schedule:
- cron: '0 7 * * *' # Daily at 7amMissing Tool Errors: 19 instances - investigate configuration
Savings: ~$38/month
Investigation Required
Before reducing frequency, investigate the missing tool errors:
- Review workflow run logs for both workflows
- Identify missing tools - check error messages for tool names
- Possible causes:
- Tools not declared in
tools:section - Network access issues preventing tool downloads
- Tool availability problems
- Tools not declared in
- Fix missing tools by updating workflow frontmatter configuration
Implementation Steps
-
Phase 1: Fix Missing Tools
- Review recent runs for both workflows
- Identify what tools are referenced but not configured
- Update
tools:section in frontmatter - Test with a manual run
-
Phase 2: Reduce Frequency
- Update cron schedules as specified above
- Run
make recompileto regenerate.lock.ymlfiles - Commit changes with message: "feat: optimize maintenance workflow schedules"
-
Phase 3: Validate
- Monitor workflows over 3-5 days
- Ensure cleanup/maintenance tasks still complete effectively
- Verify error rates decrease after tool fixes
Acceptance Criteria
- Missing tool errors investigated and documented
- Workflow configurations updated to fix missing tools
- Hourly CI Cleaner schedule updated to twice daily
- Tidy schedule updated to once daily
-
.lock.ymlfiles recompiled - Both workflows run successfully on new schedules
- Missing tool errors eliminated or significantly reduced
- Cost reduction of ~$70/month achieved
Expected Impact
- Savings: ~$70/month (87% reduction)
- Frequency: 39 runs/day → 3 runs/day
- Reliability: Fewer errors after fixing missing tool issues
- Maintenance Coverage: Still adequate for cleanup tasks
Related to [plan] Optimize workflow costs - Reduce monthly spend by 18-26% #7331
AI generated by Plan Command for discussion #7231