Skip to content

feat(functions): wait for submitted deployments - #202

Closed
tkkhq wants to merge 1 commit into
mainfrom
feat/function-deploy-wait
Closed

tkkhq wants to merge 1 commit into
mainfrom
feat/function-deploy-wait

Conversation

@tkkhq

@tkkhq tkkhq commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Tracking

Why

  • deployment callers cannot prove that the exact functions submitted by their command became active because the deploy command does not retain and check the deployment IDs returned by the API

Summary

  • add functions deploy --wait for single and batch deployments
  • poll each deployment ID returned by the deploy response and fail if that exact deployment does not become active
  • retry temporary deployment lookup errors three times and fail on persistent errors
  • document the new flag

Verification

  • make lint
  • go test ./...
  • go build ./...

@tkkhq
tkkhq requested a review from a team as a code owner September 12, 2026 03:10
Copilot AI balanced review requested due to automatic review settings September 12, 2026 03:10

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.

🟡 Changes recommended

Failed deployments currently discard the API-provided error message, preventing actionable diagnostics.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds optional waiting for submitted function deployments to reach active status.

Changes:

  • Adds functions deploy --wait for single and batch deployments.
  • Polls exact deployment IDs with retry and terminal-state handling.
  • Adds tests and user documentation.
File summaries
File Description
internal/cmd/functions/deploy.go Implements the flag and polling workflow.
internal/cmd/functions/deploy_test.go Tests success, rollback, and lookup failures.
internal/cmd/functions/helpers_test.go Adds deployment response fixtures.
docs/functions.md Documents --wait behavior and usage.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

case apiclient.FunctionDeploymentStatusProvisioning,
apiclient.FunctionDeploymentStatusQueued:
default:
return fmt.Errorf("function %q deployment %s finished with status %s", fn.Name, deploymentID, deployment.Status)
@tkkhq
tkkhq requested a review from marckong September 12, 2026 03:14
@tkkhq tkkhq closed this Sep 12, 2026
@tkkhq
tkkhq deleted the feat/function-deploy-wait branch September 12, 2026 03:18
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.

2 participants