ci(release): fail the PSGallery check on a query error instead of assuming not-published#12
Conversation
…uming not-published Follow-up to recovery-gap #11. Publish is now gated only on this check, so a transient Find-Module failure (returning $null under -ErrorAction SilentlyContinue) was indistinguishable from a genuine miss and could trigger a blind publish. Capture -ErrorVariable: publish only on a clean miss (genuine not-found records no error, verified); throw on a recorded error so the run is retryable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow's PSGallery version check now captures errors from ChangesPSGallery Version Check Error Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Pull request overview
Updates the release workflow’s PowerShell Gallery preflight check to distinguish a true “module version not found” from a transient PSGallery query failure, preventing accidental publishes when the lookup fails.
Changes:
- Captures
Find-Moduleerrors via-ErrorVariablewhile keeping the normal “not found” case silent. - Throws (fails the job) when a PSGallery query error is recorded, making the run retryable instead of attempting a blind publish.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Follow-up to the recovery-gap fix (#11). Now that
Publishis gated only on the PSGallery check,Find-Module -ErrorAction SilentlyContinuereturning$nullfor both a genuine miss and a transient query failure could trigger a blind publish. Fix: capture-ErrorVariable— publish only on a clean miss (genuine not-found records no error, verified),throwon a recorded error so the run is retryable. Surfaced by CodeRabbit/Copilot during the YTMP rollout. YAML parses; no manifest change.🤖 Generated with Claude Code
Summary by CodeRabbit