Repository navigation
ci(vercel): fix 'Canceled by Ignored Build Step' failures in Vercel Preview Built #3614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,21 +9,13 @@ fi | |
|
|
||
| BASE="" | ||
|
|
||
| if [ -n "${VERCEL_GIT_PREVIOUS_SHA:-}" ]; then | ||
| if git cat-file -e "${VERCEL_GIT_PREVIOUS_SHA}^{commit}" 2>/dev/null; then | ||
| BASE="$VERCEL_GIT_PREVIOUS_SHA" | ||
| fi | ||
| fi | ||
|
|
||
| git fetch --quiet --depth=200 origin main 2>/dev/null || true | ||
| BASE="$(git merge-base HEAD FETCH_HEAD 2>/dev/null || true)" | ||
| if [ -z "$BASE" ]; then | ||
| git fetch --quiet --depth=100 origin main 2>/dev/null || true | ||
| BASE="$(git merge-base HEAD FETCH_HEAD 2>/dev/null || true)" | ||
| if [ -z "$BASE" ]; then | ||
| if git cat-file -e origin/main^{commit} 2>/dev/null; then | ||
| BASE="origin/main" | ||
| elif git rev-parse --verify origin/main >/dev/null 2>&1; then | ||
| BASE="origin/main" | ||
| fi | ||
| if git cat-file -e origin/main^{commit} 2>/dev/null; then | ||
| BASE="origin/main" | ||
|
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔎 Supported by static analysis
Do not use
Deepen the history when needed. If the merge base remains unavailable, build instead of skipping. Suggested fix
|
||
| elif git rev-parse --verify origin/main >/dev/null 2>&1; then | ||
| BASE="origin/main" | ||
| fi | ||
| fi | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a non-Dependabot PR with no frontend changes, this condition now skips the wait step and leaves
preview_urlempty while the preview job succeeds. However, the downstreamaccess-linkjob still runs: its comment step only excludes Dependabot branches (line 218) and explicitly throwsThe preview job did not return an access URLwhen that output is empty (line 230). Consequently, backend-only PRs still get a failing workflow, just in a different job. Gate the access-link job or its comment step on a nonempty preview URL as well.Useful? React with 👍 / 👎.