-
Notifications
You must be signed in to change notification settings - Fork 1
🚀 Static Site SDK: CI reliability and performance improvements #153
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
Major changes to make screenshot capture more robust: **Browser Optimizations:** - Add CI-optimized browser args (disable GPU, reduce memory, etc.) - Reduce protocolTimeout from 180s to 60s for faster failure detection - Limit V8 heap size to 512MB to prevent memory bloat **Tab Recycling:** - Recycle tabs after 10 uses to prevent memory leaks - Track tab usage and automatically close/replace stale tabs - Prevents accumulating memory from page JavaScript **Retry Logic:** - On timeout/crash, close bad tab and retry with fresh one - Only report failure after retry also fails - Detect timeout, Target closed, and Protocol errors **Screenshot Timeout:** - Add 45s timeout to screenshot capture (was using 180s default) - Add --timeout CLI flag to override - Configurable via screenshot.timeout in config These changes address issues where CI runners would hang on certain pages due to resource exhaustion or stuck browser tabs.
Use output.print(), blank(), hint(), warn() instead of logger.info() for the 'No TDD server' message to match the CLI's output style.
|
Found 4 test failures on Blacksmith runners: Failures
|
PR Review: Static Site SDK CI Reliability and Performance ImprovementsThis is a well-crafted PR that addresses real-world CI/CD pain points with thoughtful solutions. The changes significantly improve reliability in resource-constrained environments. 🎯 Strengths1. Excellent Problem-Solution Alignment
2. Strong Code Quality
3. Well-Structured Changes
🔍 Critical IssuesTest Coverage Gap
|
- Add pool.js tests: tab recycling after N uses, recycled stat tracking, _poolEntry metadata preservation, new tab creation failure handling, and use count increment behavior - Add tasks.js tests: retry logic for timeout errors, retry with fresh tab, no retry on second failure, retry note appended to errors, tab closure before retry, and pool returning null during retry - Fix bug in pool.js where tab metadata could be lost in edge case
Summary
outputmodule methods (print(),blank(),hint(),warn())These changes make the static site SDK much more robust in resource-constrained CI environments where screenshot timeouts were causing ETA calculations to spike and jobs to hang.
Test plan