fix: parallelize news CDN scan and add timeout to prevent test failure#2682
Merged
Conversation
…meout The no-external-cdn test was timing out because it sequentially read 5499 HTML files in the news/ directory. This change: - Processes files in parallel batches of 100 (reduces I/O wait) - Adds explicit 60s timeout (was defaulting to 10s) Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pethers
May 22, 2026 15:37
View session
Contributor
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: testing,size-s Label Categories
For more information, see |
Contributor
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability of the “no external CDN” CI guard by speeding up the scan across thousands of rendered news HTML files and by setting an explicit per-test timeout suitable for slower CI disks.
Changes:
- Parallelized
findForbidden()file scanning usingPromise.allin fixed-size batches (100 files per batch) instead of sequentialawaitper file. - Added a
60_000mstimeout to the rendered news articles test to prevent Vitest default-timeout failures in CI.
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.
no-external-cdn.test.tstimed out scanning 5,499 HTML files sequentially against a 10s default timeout.Changes
findForbiddennow processes files inPromise.allbatches of 100 instead of sequentialawaitper file (~7s vs >10s)60_000mstimeout to the news article test case to accommodate CI environments with slower disk I/O