Skip to content

Fix CLI deployment inactivity timeout and help usage name#1457

Merged
ChiragAgg5k merged 3 commits intomasterfrom
fix/cli-deployment-timeout-and-help
Apr 17, 2026
Merged

Fix CLI deployment inactivity timeout and help usage name#1457
ChiragAgg5k merged 3 commits intomasterfrom
fix/cli-deployment-timeout-and-help

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

  • reset CLI deployment timeout checks based on deployment inactivity instead of total elapsed time, so active builds with realtime logs do not fail after 10 minutes
  • preserve the existing site screenshot finalization flow while removing the old fixed deadline extension logic
  • force Commander help usage to show appwrite for nested commands instead of the compiled binary basename

Testing

  • docker run --rm -v "$PWD":/app -w /app php:8.3-cli php example.php cli
  • cd examples/cli && bun run build:cli
  • cd examples/cli && node dist/cli.cjs sites get-deployment --help
  • composer lint-twig

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 17, 2026

Greptile Summary

This PR fixes two independent issues in the CLI: it pins Commander's .name() so nested command help always displays appwrite instead of the compiled binary basename, and it replaces the fixed timeoutDeadline wall-clock approach with an inactivity-based tracker that resets on any meaningful deployment state change (status, logs, screenshots, $updatedAt). The screenshot-finalization deadline extension is safely removed because the 30 s SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS bound is far below the 10 min inactivity threshold, and status transitioning to ready already resets the tracker.

Confidence Score: 5/5

Safe to merge — both changes are well-scoped and the inactivity timeout logic is sound.

No P0/P1 findings. The inactivity tracker correctly initialises lastSignature before any poll loop iteration, screenshot finalization is still bounded to 30 s (much less than the 10 min inactivity window), and the Commander .name() fix is a one-liner with no side-effects. Prior reviewer concern about the no-arg touch() overload has been resolved.

No files require special attention.

Important Files Changed

Filename Overview
templates/cli/cli.ts.twig Adds .name() to Commander root program so nested command help shows appwrite instead of the compiled binary basename — minimal, correct change.
templates/cli/lib/commands/push.ts Replaces fixed timeoutDeadline with an inactivity-based tracker; adds getDeploymentProgressSignature and createDeploymentTimeoutTracker helpers; removes the screenshot-deadline extension (safe because SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS is 30 s, far below the 10 min inactivity threshold).

Reviews (2): Last reviewed commit: "fix(cli): remove unused timeout tracker ..." | Re-trigger Greptile

Comment thread templates/cli/lib/commands/push.ts Outdated
@ChiragAgg5k ChiragAgg5k merged commit 7725c36 into master Apr 17, 2026
93 of 94 checks passed
@ChiragAgg5k ChiragAgg5k deleted the fix/cli-deployment-timeout-and-help branch April 17, 2026 07:16
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.

1 participant