Repository navigation
perf(ci): keep the Node.js archive so re-setup skips the download - #4001
Merged
Merged
Conversation
The setup script already checked `if not download_path.exists()` before downloading, but then deleted the archive at the end — making that reuse path dead code. Every re-provision re-fetched ~30MB from nodejs.org. The archive is now retained in .cache/js-tools/. Removing that directory still forces a clean re-provision. Extraction is factored into `_extract()` and wrapped so a truncated or corrupt cached archive (an interrupted download) is discarded and fetched once more instead of failing setup. Measured on Windows: cold (download + extract + npm install) 25.1s warm (archive retained, tree removed) 13.7s -45% corrupt archive detected, re-downloaded, exit 0 Refs #3968 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Node.js setup script now caches downloaded archives, separates downloading from extraction, preserves platform-specific extraction behavior, and retries once after detecting a corrupted archive. ChangesNode.js archive handling
Estimated code review effort: 3 (Moderate) | ~20 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ci/setup-js-linting-fast.pyalready guarded the download withif not download_path.exists()— but then deleted the archive at the end of the function:So the reuse path was dead code and every re-provision re-fetched ~30MB from nodejs.org.
Change
.cache/js-tools/. Removing that directory still forces a clean re-provision, so there is no new escape hatch to learn._extract()and wrapped: a truncated or corrupt cached archive (an interrupted download) is discarded and fetched once more rather than failing setup. Without this, retaining the archive would trade one failure mode for another.Measured (Windows)
Corruption path verified end to end:
bash lintclean.Refs #3968
🤖 Generated with Claude Code
Summary by CodeRabbit