Skip to content

fix(vercel-reusable): production deploy false-red — URL parse only matched "Preview:" and aborted under set -e on --prod#235

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-06-20-vercel-reusable-prod-url-parse
Jun 20, 2026
Merged

fix(vercel-reusable): production deploy false-red — URL parse only matched "Preview:" and aborted under set -e on --prod#235
thedavidmeister merged 1 commit into
mainfrom
2026-06-20-vercel-reusable-prod-url-parse

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

The Deploy to Vercel step in this reusable extracted the deployment URL with grep -oE 'Preview: https://...' under bash --noprofile --norc -euo pipefail. A production (--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, e.g. v6.raindex.finance).

That is exactly why preview deploys are green but production deploys go red.

Fix

  • Match both Preview: and Production: in the primary grep.
  • Guard every URL-extraction grep with || true so a no-match can never abort the step under set -euo pipefail.

Validation (local, against the real failed production output)

  • Old extraction → exit 1 (reproduces the false-red).
  • New extraction → exit 0, extracts url=https://rain-orderbook-v6-…vercel.app and the Inspect URL.

Impact

Unblocks raindex main production / 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

  • Chores
    • Improved deployment workflow reliability with enhanced URL extraction logic for both preview and production deployments, ensuring more robust error handling.

…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>
@thedavidmeister thedavidmeister self-assigned this Jun 20, 2026
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e128e3c2-0d24-425a-91d9-5643a8503ca7

📥 Commits

Reviewing files that changed from the base of the PR and between f6bca08 and 783b8d6.

📒 Files selected for processing (1)
  • .github/workflows/rainix-vercel.yaml

📝 Walkthrough

Walkthrough

The Vercel deploy step's shell URL-extraction logic is updated so that preview_url matches either a Preview: or Production: labeled line, with a fallback to the last bare vercel.app URL. All grep calls are guarded with || true to prevent step failure under set -euo pipefail when patterns are absent.

Changes

Vercel Deploy URL Extraction

Layer / File(s) Summary
Deploy URL capture and fallback logic
.github/workflows/rainix-vercel.yaml
preview_url now greps for Preview: or Production: lines with a fallback to the last bare vercel.app URL; all grep calls are guarded with || true so the step does not fail when labeled lines are absent. inspect_url extraction is similarly made non-fatal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • rainlanguage/rainix#227: Originally introduced the preview_url/inspect URL capture and PR comment step in the same workflow file that this PR hardens.

Poem

🐇 Hoppity-hop through the CI lane,
A missing Preview: line caused no pain,
With || true the grep won't break,
Production URLs we safely take,
The deploy comments hop on through the rain! 🌧️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a production deployment failure caused by URL parsing logic that only matched 'Preview:' output and failed under strict bash error handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-20-vercel-reusable-prod-url-parse

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thedavidmeister

Copy link
Copy Markdown
Contributor Author

human-approved; merging

@thedavidmeister thedavidmeister merged commit 6b43e60 into main Jun 20, 2026
13 checks passed
@thedavidmeister thedavidmeister deleted the 2026-06-20-vercel-reusable-prod-url-parse branch June 20, 2026 20:04
@github-actions

Copy link
Copy Markdown

@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:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

SIZE=S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant