Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
| 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 |
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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
|
Testing
./deploy --env=local next