fix(ci): resolve Deploy - Frontend to Vercel and Artifacts failures (#387) - #517
Open
ValJnr-dev1 wants to merge 1 commit into
Conversation
- Bump actions/setup-node@v7 → @v4 in deploy.yml (deploy-frontend, generate-sbom) - Bump actions/upload-artifact@v7 → @v4 in deploy.yml (all five upload steps) - Bump actions/download-artifact@v8 → @v4 in deploy.yml (all five download steps) - Replace vercel/action@v5 (non-existent) with amondnet/vercel-action@v42 - Update Node.js version from 18.x → 22 to match project requirements - Switch install from npm ci → corepack enable && yarn install --immutable - Switch build command from npm run build → yarn build (project uses Yarn 4) - Bump actions/setup-node@v7 → @v4 in auto-rollback.yml - Fix double res.status(200).json() call in api/status.ts by merging circuitBreakers into the single versioned response, eliminating the 'Cannot set headers after they are sent' crash in the serverless function Closes PromptMintLabs#387
|
@ValJnr-dev1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the CI/deploy failures described in issue #387 (SEV-1 auto-rollback ticket).
Root causes and fixes:
1. Non-existent GitHub Actions action versions
The workflow referenced action versions that do not exist on the marketplace, causing every run to fail immediately:
actions/setup-node@v7@v4actions/upload-artifact@v7@v4actions/download-artifact@v8@v4vercel/action@v5(non-existent)amondnet/vercel-action@v42Applies to both
deploy.ymlandauto-rollback.yml.2. Wrong Node.js version
Node
18.xwas specified but the project requires Node 22+ (documented inREADME.md, enforced byscripts/check-local-setup.mjs). Updated to22in the two jobs that use it.3. Wrong package manager (npm vs Yarn 4)
The project uses Yarn 4 Berry (no
package-lock.json, onlyyarn.lock,packageManagerfield inpackage.json). The workflow was callingnpm ciandnpm run build, which fail because there is no lockfile for npm. Fixed to:corepack enableyarn install --immutableyarn buildcache: 'yarn'4. Double
res.status(200).json()inapi/status.tsThe handler called
res.status(200).json()twice — the second call (added forcircuitBreakers) was unreachable and would crash the serverless function with "Cannot set headers after they are sent" in any environment that enforces the Node.js HTTP contract. Fixed by mergingcircuitBreakersinto the single versioned response object.Tests
api/status.test.ts: 3/3 ✅src/lib/ops/rollback.test.ts: 16/16 ✅Files changed
.github/workflows/deploy.yml.github/workflows/auto-rollback.ymlapi/status.tsCloses #387