Repository navigation
feat: generate Vercel deployment artifacts from spec.deployment.vercel - #205
Conversation
|
@claude What about changing the CD template? I don't want the user just typing |
|
Claude finished @edenreich's task in 8m 3s —— View job Vercel deployment wired into the CD workflowYou're right —
What changed
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: 24
- name: Install Vercel CLI
run: npm install --global vercel
- name: Install task
uses: arduino/[email protected]
with:
version: 3.48.0
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: task deployDesign: this mirrors the existing cloudrun precedent, whose CD job also delegates to Added One thing worth a follow-up (not done here)The |
|
@infer /model deepseek/deepseek-v4-pro Can you review these changes? use /maintainer |
|
I'm cooking...will get back to you soon... Pull Request✅ Infer Result: SuccessThe task is complete. Model: Tokens: 718,800 in · 9,263 out · 728,063 total (20 requests) Cost: $1.2507 in · $0.0322 out · $1.2829 total Tool calls: 32 total · 100% success rate Agent output (tail)Triggered by edenreich · Infer Action |
There was a problem hiding this comment.
Review of PR #205: Vercel deployment artifacts
tl;dr: LGTM. Clean, well-tested implementation with good test coverage. Two minor observations below, neither blocking.
What I checked
| Check | Result |
|---|---|
go test ./... |
All pass |
go vet ./... |
Clean |
go fmt ./... |
Clean (see note below) |
| Template correctness | All VercelConfig fields mapped |
| Registry wiring (Go/Rust/TS) | Consistent across all three languages |
examples:test / examples:generate wiring |
vercel-agent in both lists |
git status |
Clean |
Template correctness
vercel.json.tmpl — All VercelConfig fields are rendered correctly:
framework— rendered when set, omitted when empty (Vercel auto-detect) ✅regions— direct array passthrough ✅functions.memory/functions.maxDuration— individually optional ✅runtime: edge→"runtime": "@vercel/edge"in the functions block ✅runtime: nodejsor unset → no runtime marker (Vercel defaults to Node) ✅environment— direct map passthrough ✅"$schema"always present ✅
project.json.tmpl — Links project → projectId, team → orgId ✅
Taskfile deploy task — Guards for CLI presence, vercel link → pull → deploy --prod with --scope when team is set. Uses VERCEL_PROJECT/VERCEL_ORG env vars, making it CI-friendly ✅
CD workflow — Mirrors the cloudrun pattern (delegates to task deploy), installs Vercel CLI, uses VERCEL_TOKEN secret. The node-version comes from spec.language.typescript.nodeVersion with an 18 fallback ✅
Test coverage
registry_vercel_test.go (163 lines) covers all the acceptance criteria:
- File mapping for vercel deployments
- Conditional inclusion only for
type: vercel - Edge runtime →
@vercel/edge - Node runtime → no edge marker
- Framework omission when unset
- Project JSON linkage
- CD workflow Vercel steps rendering and non-leakage of cloudrun/k8s steps
The test table is thorough and follows the repo table-driven pattern with t.Run/helper usage ✅
Observations (non-blocking)
1. vercel.json file extension defaults to "ts"
In vercel.json.tmpl line 2: $ext := "ts" with overrides for go/rust. For Go and Rust projects, the generated functions pattern becomes api/**/*.go or api/**/*.rs. This is technically correct for the language, but Vercel deploys Go/Rust from source are unusual. Since the Vercel integration is primarily a TypeScript workflow (the CD workflow even hard-depends on Node.js setup), this is fine — just noting that Go/Rust+Vercel is an edge case the template handles syntactically but likely will not be exercised in practice.
2. CD release job still runs Docker/QEMU/Buildx/GHCR login for Vercel
The PR description already acknowledges this in the follow-up comment from @claude[bot]. Those steps (lines 146–161 of cd.yaml.tmpl) are not gated on deployment type and are dead weight for Vercel. Worth a follow-up PR to gate on kubernetes/cloudrun only, but do not block this one on it.
3. Pre-existing go fmt drift on main
Running go fmt ./... modifies internal/generator/typescript_test.go (whitespace alignment, not touched by this PR). I restored it to keep the PR clean, but this is a pre-existing issue on main worth a quick chore PR.
Docs follow-up
Per the maintainer docs-follow-up rule: this is a feat: change outside inference-gateway/docs, so a [DOCS] issue should be filed against inference-gateway/docs. The PR description acknowledges this but did not create it. The ticket should cover:
spec.deployment.type: verceloptionspec.deployment.vercelblock (project, team, framework, runtime, regions, functions, environment)- The generated
vercel.json,.vercel/project.json, andtask deploy - The required
VERCEL_TOKENGitHub secret
Verdict
Approve. This is a solid implementation — comprehensive tests, clean templates, follows existing patterns (cloudrun precedent for CD delegation), and no regressions. The two observations above are minor and can be addressed in follow-up PRs.
## [0.44.0](v0.43.2...v0.44.0) (2026-06-18) ### ✨ Features * generate cloudflare workers artifacts from deployment block ([#224](#224)) ([a50dd2e](a50dd2e)) * generate Vercel deployment artifacts from spec.deployment.vercel ([#205](#205)) ([0658e85](0658e85)) ### ♻️ Improvements * bump CI/CD dependencies to latest in templates ([#223](#223)) ([ca93db3](ca93db3)) ### 👷 CI * add permissions section to CI workflow ([16537a7](16537a7)) * centralize claude.yml via reusable workflow ([#214](#214)) ([98c96a6](98c96a6)) * update nix.yml to include permissions for contents ([61af48c](61af48c)) ### 🔧 Miscellaneous * **deps:** bump charm.land/lipgloss/v2 in the gomod group ([#220](#220)) ([33e1769](33e1769)) * **deps:** bump claude-code 2.1.158 -> 2.1.161, claude-code-action v1.0.133 -> v1.0.135 ([#211](#211)) ([0995d85](0995d85)) * **deps:** bump claude-code 2.1.161 -> 2.1.170, claude-code-action v1.0.135 -> v1.0.142 ([#216](#216)) ([8297544](8297544)) * **deps:** bump claude-code 2.1.170 -> 2.1.177, claude-code-action v1.0.142 -> v1.0.150 ([#218](#218)) ([8741ca0](8741ca0)) * **deps:** bump codex 0.133.0 -> 0.135.0 ([#207](#207)) ([c9e9d4b](c9e9d4b)) * **deps:** bump golang.org/x/term in the gomod group ([#215](#215)) ([b2ab82c](b2ab82c)) * **deps:** bump infer CLI v0.117.1 -> v0.119.0, infer-action v0.11.2 -> v0.11.4 ([#208](#208)) ([46417d5](46417d5)) * **deps:** bump infer CLI v0.119.0 -> v0.120.0, infer-action v0.11.4 -> v0.11.6 ([#209](#209)) ([707a03d](707a03d)) * **deps:** bump infer CLI v0.120.0 -> v0.120.1, infer-action v0.11.6 -> v0.11.7 ([#210](#210)) ([1c3bf86](1c3bf86)) * **deps:** bump infer CLI v0.120.1 -> v0.121.0 ([#212](#212)) ([d3d95ec](d3d95ec)) * **deps:** bump infer CLI v0.121.0 -> v0.121.1, infer-action v0.12.1 -> v0.13.1 ([#217](#217)) ([5ee4f98](5ee4f98)) * **deps:** bump infer-action v0.11.1 -> v0.11.2 ([#204](#204)) ([59a75c6](59a75c6)) * **deps:** bump infer-action v0.11.7 -> v0.12.1 ([#213](#213)) ([27dcc3e](27dcc3e)) * **deps:** bump infer-action v0.13.1 -> v0.15.1 ([#219](#219)) ([1ce05dd](1ce05dd))
|
🎉 This PR is included in version 0.44.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Consumes the
spec.deployment.vercel(VercelConfig) block — already vendored in schemav0.15.0— to scaffold Vercel deployment artifacts whenspec.deployment.type: vercel.internal/templates/common/vercel/{vercel.json,project.json}.tmpl, wired into the registry file map for Go/Rust/TypeScript.vercel.jsonrendersframework(omitted for auto-detect),regions, afunctionsmap (memory/maxDuration), andenvfromvercel.environment.runtime: edgemaps the function config to"runtime": "@vercel/edge"..vercel/project.json(projectId/orgIdfromproject/team) plus a generateddeploytask that runsvercel link/pull/deployfor interactive workflows.examples/vercel-agent.yaml(TypeScript, exercises edge runtime + regions + function limits + env) and wired it intotask examples:testandtask examples:generate.Vercel deploys from source, so there is no
ImageConfiginvolved (unlike kubernetes/cloudrun).Test plan
go test ./...(incl. newregistry_vercel_test.go)go vet ./...,go fmt ./...cleanadl validate examples/vercel-agent.yamladl generateof the example — verified renderedvercel.json,.vercel/project.json, and TaskfiledeploytaskDocs follow-up
User-facing
feat, so a matching[DOCS]issue should be filed againstinference-gateway/docsfor thespec.deployment.type: verceloption (not filed automatically per maintainer policy).Closes #182