Skip to content

[next] fix ./deploy --local next#1136

Open
maxkosty wants to merge 1 commit intomasterfrom
fix-next-deploy-local
Open

[next] fix ./deploy --local next#1136
maxkosty wants to merge 1 commit intomasterfrom
fix-next-deploy-local

Conversation

@maxkosty
Copy link
Collaborator

Testing

./deploy --env=local next

@vercel
Copy link
Contributor

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
empower Ignored Ignored Dec 18, 2025 5:37pm

Comment on lines +431 to +434
if [ ! -f "app.yaml.template" -a ! -f "deploy_project.sh" ]; then
echo "[ERROR] Project $proj must contain either app.yaml.template with '\${SERVICE}' placeholder OR a deploy_project.sh script."
exit 1
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The project validation check is now inside an else block and is skipped for projects with a build.sh file when deployed locally, bypassing necessary configuration checks.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

The validation check to ensure a project contains either app.yaml.template or deploy_project.sh was moved into an else block. This causes the validation to be skipped for projects that have a build.sh file when they are deployed with --env=local. For example, the next project, which has a build.sh but lacks the required deployment files, will now incorrectly pass validation when deployed locally. This breaks the intended fail-fast behavior, allowing a misconfigured project to proceed further into the deployment process than it should.

💡 Suggested Fix

The validation check if [ ! -f "app.yaml.template" -a ! -f "deploy_project.sh" ] should be moved out of the else block and placed before the main if/else conditional. This will ensure it runs unconditionally for all projects, restoring the original fail-fast validation behavior.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: deploy#L431-L434

Potential issue: The validation check to ensure a project contains either
`app.yaml.template` or `deploy_project.sh` was moved into an `else` block. This causes
the validation to be skipped for projects that have a `build.sh` file when they are
deployed with `--env=local`. For example, the `next` project, which has a `build.sh` but
lacks the required deployment files, will now incorrectly pass validation when deployed
locally. This breaks the intended fail-fast behavior, allowing a misconfigured project
to proceed further into the deployment process than it should.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7717211

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.64%. Comparing base (28c87de) to head (f9042f1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1136   +/-   ##
=======================================
  Coverage   24.64%   24.64%           
=======================================
  Files          41       41           
  Lines        1205     1205           
  Branches      137      137           
=======================================
  Hits          297      297           
  Misses        883      883           
  Partials       25       25           
Flag Coverage Δ
api 5.57% <ø> (ø)
frontend 40.98% <ø> (ø)
Components Coverage Δ
checkout_module 5.57% <ø> (ø)
product_component 37.69% <ø> (ø)

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