fix(vercel-reusable): production deploy false-red — URL parse only matched "Preview:" and aborted under set -e on --prod#235
Conversation
…tched "Preview:" and aborted under set -e on --prod The "Deploy to Vercel" step extracted the deployment URL with `grep -oE 'Preview: https://...'` under `bash -euo pipefail`. A `--prod` deploy prints `Production: <url>`, not `Preview:`, so that grep matched nothing, exited 1, and pipefail+set -e aborted the step BEFORE the fallback ran — even though the deploy itself SUCCEEDED (it aliases to the production domain). That is why preview deploys were green but production deploys went red. Fix: match both `Preview:` and `Production:`, and guard every URL-extraction grep with `|| true` so a no-match can never abort the step. Validated locally against the real failed production output: the old grep exits 1; the new one exits 0 and extracts both the Production URL and the Inspect URL. Unblocks raindex main `production / deploy` (red since #2739 migrated raindex onto this reusable). Production was never actually broken — the site was deploying the whole time; only the post-deploy URL-parse step false-failed. Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Vercel deploy step's shell URL-extraction logic is updated so that ChangesVercel Deploy URL Extraction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
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 |
|
human-approved; merging |
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
|
Tip For best results, initiate chat on the files or code changes. SIZE=S |
The
Deploy to Vercelstep in this reusable extracted the deployment URL withgrep -oE 'Preview: https://...'underbash --noprofile --norc -euo pipefail. A production (--prod) deploy printsProduction: <url>, notPreview:, so that grep matched nothing, exited 1, and pipefail +set -eaborted the step before the fallback ran — even though the deploy itself succeeded (it aliases to the production domain, e.g.v6.raindex.finance).That is exactly why preview deploys are green but production deploys go red.
Fix
Preview:andProduction:in the primary grep.|| trueso a no-match can never abort the step underset -euo pipefail.Validation (local, against the real failed production output)
url=https://rain-orderbook-v6-…vercel.appand the Inspect URL.Impact
Unblocks raindex
mainproduction / deploy, red since rainlanguage/raindex#2739 migrated raindex onto this reusable. Production was never actually broken — the site has been deploying the whole time; only the post-deploy URL-parse step false-failed. Shared by every webapp deploy that uses this reusable, so this fixes the production path for all of them.🤖 Generated with Claude Code
Summary by CodeRabbit