-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: GA ubuntu-slim #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added detailed research document analyzing the feasibility and cost savings of migrating WebKit workflow jobs to GitHub Actions ubuntu-slim runners. Key findings: - ubuntu-slim runners are ~50% cheaper but have 15-minute timeout - Identified 8 jobs suitable for migration (Phase 1) - Estimated savings: $19-23/month per private repository - Organization-wide potential: $2,000-14,000/year Recommendations: - Proceed with Phase 1 migration for low-risk jobs - Do NOT migrate build/test jobs due to timeout limitations - Requires thorough testing before rollout Document includes: - Technical specifications of ubuntu-slim runners - Detailed job-by-job compatibility analysis - Cost projections and ROI calculations - Phased migration strategy with testing plan - Risk assessment and rollback procedures
Created comprehensive implementation plan for migrating to ubuntu-slim runners in WebKit workflow templates. Scope: - Tier 1: 6 ultra-safe jobs (all under 1 minute) - Tier 2: drift-detection (30s, user requested) - Total: 9 job types across 2 template files Risk Assessment: Very Low - All jobs have 14+ minute safety buffer from 15min timeout - Based on actual production timing data from screenshots - Only lightweight operations (no builds/tests) Implementation: - Phase 1: Modify 2 template files (30 min) - Phase 2: Test in sample repo (1-2 weeks) - Phase 3: Release new WebKit version (week 3) - Phase 4: Monitor for issues (month 1-2) Expected Savings: - ~$3.88/month per private repo - $38-194/month org-wide (10-50 repos) - $465-2,328/year depending on adoption Includes: - Exact file paths and line numbers to change - Testing strategy with success criteria - Rollback procedures - Risk mitigation plans - User documentation template
Optimized GitHub Actions costs by migrating 9 fast-running jobs to ubuntu-slim (single-CPU container) runners across PR and Release workflow templates. Changes: - Modified internal/templates/.github/workflows/pr.yaml.tmpl (6 jobs) - Modified internal/templates/.github/workflows/release.yaml.tmpl (4 jobs) Jobs migrated to ubuntu-slim: PR Workflow: 1. setup-webkit (22-24s → 14m36s safety buffer) 2. secret-scan (24s → 14m36s buffer) 3. detect-changes (39s → 14m21s buffer) 4. drift-detection (30s → 14m30s buffer) 5. app-json-diff (25s → 14m35s buffer) 6. validate-app-json (24s → 14m36s buffer) Release Workflow: 7. setup-webkit (24s → 14m36s buffer) 8. cleanup-containers (5-6s → 14m54s buffer) 9. notify-success (20s → 14m40s buffer) 10. notify-failure (~20s → 14m40s buffer) Impact: - Cost reduction: ~50% per job (~$0.004/min savings) - Expected savings: $3.88/month per private repository - Organization-wide: $465-2,328/year (10-50 repos) - Risk: Very low - all jobs have 14+ minute buffer from 15min timeout Build/test/deploy jobs remain on ubuntu-latest (not compatible). Based on actual production timing data from screenshots showing all migrated jobs complete in <1 minute consistently. Users will receive these optimizations when running 'webkit update' after this version is released. Related: UBUNTU_SLIM_RESEARCH.md, UBUNTU_SLIM_IMPLEMENTATION_PLAN.md
Removed research and implementation plan documents as the ubuntu-slim migration has been completed. The actual changes are in the workflow templates.
Review summary
This PR implements a sensible cost optimisation by migrating lightweight GitHub Actions jobs to Critical issues 🔴None Warnings 🟡1. Missing validation of ubuntu-slim runner availability (release.yaml.tmpl:394, 421)The Impact: Users might not receive critical deployment notifications if slim runners are unavailable. Recommendation: Consider keeping notification jobs on Example fallback patternnotify-success:
runs-on: ubuntu-latest # Keep critical notifications on standard runners
# ... rest of job2. No testing strategy mentioned in PR descriptionThe PR description mentions "Requires thorough testing before rollout" and includes detailed implementation and testing plans in the commit messages, but there's no evidence of actual testing performed before this PR was opened. Impact: Without real-world validation, edge cases or compatibility issues with Recommendation:
Suggestions 🟢1. Consider documenting the 15-minute timeout limitationThe commit messages mention that Suggestion: Add a comment in the template files explaining the runner choice: # Uses ubuntu-slim for cost savings (~50% cheaper)
# Note: ubuntu-slim has 15-minute timeout - only use for jobs completing in <5 minutes
jobs:
setup-webkit:
runs-on: ubuntu-slim2. Job timing validation could prevent future regressionsSince the safety margin is based on jobs completing in under 1 minute with a 14+ minute buffer, adding workflow timing assertions could prevent accidental migration of longer-running jobs. Suggestion: Consider adding a post-deployment monitoring step or workflow that alerts if any Scoring guide (1-10):
Score justification: The code changes are minimal, focused, and technically sound. The selection of jobs to migrate is well-reasoned based on actual runtime data. However, the lack of documented testing and potential reliability concerns for notification jobs prevent a higher score. This is a solid improvement that would benefit from addressing the monitoring and documentation gaps. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
==========================================
+ Coverage 64.59% 69.47% +4.87%
==========================================
Files 154 184 +30
Lines 6064 7279 +1215
==========================================
+ Hits 3917 5057 +1140
+ Misses 2064 2025 -39
- Partials 83 197 +114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added detailed research document analyzing the feasibility and cost
savings of migrating WebKit workflow jobs to GitHub Actions ubuntu-slim
runners.
Key findings:
Recommendations:
Document includes: