Skip to content

fix(deploy): align build-watch deadline with server-side build limit - #94

Open
ealogar wants to merge 4 commits into
mainfrom
fix/build-watch-deadline-alignment
Open

fix(deploy): align build-watch deadline with server-side build limit#94
ealogar wants to merge 4 commits into
mainfrom
fix/build-watch-deadline-alignment

Conversation

@ealogar

@ealogar ealogar commented Sep 4, 2026

Copy link
Copy Markdown

The CLI's global command deadline defaulted to 10m while deployment-api caps builds via BUILDER_ACTIVE_DEADLINE_SECONDS (default 15m). Builds taking 10-15m tripped the client-side deadline and surfaced as "failed to watch deployment ... context exceeds deadline" even though the build was still progressing server-side.

  • Raise defaultTimeout to 16m so the server-side build limit is always reached first and the CLI reports the real build outcome.
  • Replace the bare "context exceeds deadline" error with an actionable message that names the package, notes the build may still be running, and wraps ctx.Err().
  • Clarify the --timeout flag help text.

The CLI's global command deadline defaulted to 10m while deployment-api
caps builds via BUILDER_ACTIVE_DEADLINE_SECONDS (default 15m). Builds
taking 10-15m tripped the client-side deadline and surfaced as
"failed to watch deployment ... context exceeds deadline" even though
the build was still progressing server-side.

- Raise defaultTimeout to 16m so the server-side build limit is always
  reached first and the CLI reports the real build outcome.
- Replace the bare "context exceeds deadline" error with an actionable
  message that names the package, notes the build may still be running,
  and wraps ctx.Err().
- Clarify the --timeout flag help text.
Copilot AI lite review requested due to automatic review settings September 4, 2026 13:41
@ealogar ealogar added the patch release Label for patch release of application label Sep 4, 2026
@vonage-ai-assistant vonage-ai-assistant Bot added the ai-generated Over 80% AI contribution label Sep 4, 2026
@vonage-ai-assistant

vonage-ai-assistant Bot commented Sep 4, 2026

Copy link
Copy Markdown

AI Code: 96%
Estimated Cost

AI Adoption Report

Lines %
AI-generated 115 96%
Human 4 4%
Total 119

💰 Cost Breakdown

Agent Model AI Lines Input Tokens Output Tokens Cost Source
kiro auto 113 1,316 395 $0.0099 📐 estimated
GitHub Copilot github-copilot 2 23 7 $0.0000 🤖 Copilot (subscription)

Total Estimated Cost: $0.0099

Data Sources:

  • 📐 3 commits with estimated tokens (~3.5 tokens/line)

Bedrock pricing: eu-central-1 region

Per-commit breakdown (4 commits)
Commit Message Added AI Human AI %
007fb78 fix: add gitignore 3 0 3 0%
aed283b test(deploy): cover WatchDeployment ctx.Done() timeout and c 99 99 0 100%
2a37e60 Potential fix for pull request finding 2 2 0 🤖 100% (Copilot)
7771ae8 fix(deploy): align build-watch deadline with server-side bui 15 14 1 93%

Powered by Git AI Standard v3.0.0 — authorship data from refs/notes/ai (supports sessions-v2 format)

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

The new ctx.Done() error path in WatchDeployment mislabels cancellations as timeouts and the new behavior isn’t covered by unit tests.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts the CLI’s global timeout behavior and deployment build-watch error reporting so long-running (10–15m) builds don’t fail client-side before the server-side build deadline is reached.

Changes:

  • Increased the root command default timeout from 10m to 16m to exceed the server-side build cap.
  • Updated --timeout help text to clarify it is a whole-command deadline (including build watching).
  • Replaced the generic build-watch timeout error with an actionable, wrapped error that includes ctx.Err().
File summaries
File Description
vcr/root/root.go Raises the global default timeout and clarifies the --timeout flag’s semantics.
pkg/api/deployment.go Improves the error returned when the build watch exits due to ctx.Done().
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

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

Comment thread pkg/api/deployment.go
Comment thread pkg/api/deployment.go
Comment thread vcr/root/root.go Outdated
ealogar and others added 3 commits September 4, 2026 15:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The build-wait timeout error path (ctx.Done() in WatchDeployment) is
user-visible but was previously untested. Add a table-driven test that
drives the watch with a short context deadline and with a cancellation,
asserting the exact error message and that it wraps context.DeadlineExceeded
and context.Canceled respectively (via errors.Is).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Over 80% AI contribution patch release Label for patch release of application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants