Repository navigation
Download plugin checksums in parallel - #162
Conversation
`wp plugin verify-checksums` downloaded the checksums of one plugin at a time, between hashing the files of the previous one. On a site with many plugins, most of the time went into waiting for these requests. Download them for all plugins up front, ten at a time, before verifying any files. Anything that isn't downloaded this way, for example because a request failed, is downloaded again one at a time as before, so error handling and retries don't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe command resolves eligible plugin versions before verification and fetches checksums in parallel batches of up to 10. It uses individual requests when prefetched results are unavailable. A feature scenario checks checksum results for three plugins. ChangesPlugin checksum batching
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant Checksum_Plugin_Command
participant RequestsLibrary
participant WordPress_org_checksum_endpoint
Checksum_Plugin_Command->>RequestsLibrary: Submit eligible checksum requests in chunks
RequestsLibrary->>WordPress_org_checksum_endpoint: Fetch checksum data
WordPress_org_checksum_endpoint-->>RequestsLibrary: Return HTTP responses
RequestsLibrary-->>Checksum_Plugin_Command: Return prefetched checksum results
Checksum_Plugin_Command->>WordPress_org_checksum_endpoint: Request checksum individually when no prefetched result is available
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue was established that would prevent merging after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
wp plugin verify-checksumsdownloaded the checksums of one plugin at a time, between hashing the files of the previous one. On a site with many plugins, most of the time went into waiting for these requests.This downloads the checksum files for all plugins up front, ten at a time, before verifying any files:
Results
wp plugin verify-checksums --allThe output is identical to
main, including for plugins without checksums.Tests
features/checksum-plugin.feature: verifies two wordpress.org plugins (one with a modified file) and a custom plugin without checksums in one run. It checks that two checksum files were downloaded in parallel, and that the mismatch, the skip warning and the final error are the same as before.features/checksum-plugin.featurepasses locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS
Summary by CodeRabbit