Skip to content

refactor: expose deploy steps for reuse across commands - #296

Merged
subnetmarco merged 2 commits into
mainfrom
refactor/deploy-entrypoints
Oct 13, 2026
Merged

subnetmarco merged 2 commits into
mainfrom
refactor/deploy-entrypoints

Conversation

@subnetmarco

@subnetmarco subnetmarco commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

First of three stacked PRs for volcano deploy. The only behavior changes are the durable hint text in local mode and the manifest name in durable messages.

  • export the deploy steps so one command can run them in sequence: DeployAll for functions and durable functions, Deploy for frontends and variables, DeployManifest for config, ApplyAll for migrations
  • function and durable deploys take an explicit manifest path instead of always reading the default one. Messages name the manifest they read: the path the caller passed, or volcano-config.yaml when the default lookup found it
  • ApplyAll trims the database and refuses an empty one, like migration up
  • envfile exports ResolvePath and ErrNotFound, so a caller can tell a missing default env file from other failures
  • durable hints use CommandPath, so local volcano functions deploy names volcano durable deploy instead of the cloud command
  • the exported entry points document that their writers are required

Stack:

  1. this PR
  2. local frontends
  3. volcano deploy

Verification

  • make lint
  • go test ./...: the durable hint test covers both the cloud and the local tree
  • the local-mode E2E asserts the local volcano durable deploy --all hint

@subnetmarco
subnetmarco marked this pull request as ready for review October 13, 2026 07:27
@subnetmarco
subnetmarco requested a review from a team as a code owner October 13, 2026 07:27
Copilot AI balanced review requested due to automatic review settings October 13, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@subnetmarco subnetmarco left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The extraction is clean. I found no behavior change, and the new DeployAll tests cover the named-manifest path for both function kinds.

One mismatch with the description: the bullet "durable hints use CommandPath" isn't in this diff. functions deploy -f still hardcodes volcano cloud durable deploy -f, and so does the hint in excludeDurable. Both switch to CommandPath in #298. Either move that hunk here or drop the bullet, so the squash message matches what lands.

Comment thread internal/cmd/functions/deploy.go Outdated
@subnetmarco
subnetmarco force-pushed the refactor/deploy-entrypoints branch from 9f1445b to 16ae1d9 Compare October 13, 2026 16:17

@swkeever swkeever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. The extraction preserves behavior for the existing commands. The only user-visible change is the local durable hint naming volcano durable deploy, which exists in the local tree. #297 and #298 only add to these entry points.

Nits inline, none blocking. One without a line to anchor: the exported entry points (functions.DeployAll, durable.DeployAll, frontends.Deploy, variables.Deploy, config.DeployManifest) panic on the first print if a caller leaves Out or ErrOut nil. The only caller today sets both; defaulting them or documenting that both are required would protect the next one.

Comment thread internal/cmd/functions/deploy_durable_test.go Outdated
Comment thread internal/cmd/functions/deploy.go Outdated
Comment thread internal/cmd/databases/migration/migration.go
Comment thread internal/envfile/envfile.go
subnetmarco and others added 2 commits October 13, 2026 10:21
Export DeployAll for functions and durable functions, Deploy for frontends
and variables, DeployManifest for config, and ApplyAll for migrations, so a
single command can run them in sequence. Function and durable deploys take
an explicit manifest path. envfile exports ResolvePath and ErrNotFound so
callers can tell a missing default env file from other failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
…abase in ApplyAll

Co-authored-by: Cursor <cursoragent@cursor.com>
@subnetmarco
subnetmarco force-pushed the refactor/deploy-entrypoints branch from 16ae1d9 to 1954160 Compare October 13, 2026 17:38
@subnetmarco
subnetmarco added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 802876c Oct 13, 2026
10 checks passed
@subnetmarco
subnetmarco deleted the refactor/deploy-entrypoints branch October 13, 2026 23:53
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.

3 participants