Skip to content

feat: add --watch flag to deploy update#22

Merged
hailangvn merged 1 commit into
mainfrom
feat/update-watch-flag
May 5, 2026
Merged

feat: add --watch flag to deploy update#22
hailangvn merged 1 commit into
mainfrom
feat/update-watch-flag

Conversation

@xaviedoanhduy
Copy link
Copy Markdown
Member

Summary

  • Add --watch flag to deploy update: after a successful deployment, streams service logs with journalctl --user -u <instance> -f
  • Add Executor.stream() method for long-lived commands that must pipe output directly to the terminal (no output capture)
  • Ctrl+C stops the log tail cleanly without error

Usage

deploy update service-myapp-production --watch

Test plan

  • 3 new unit tests covering: stream called with correct command, not called without --watch, KeyboardInterrupt handled gracefully
  • All 25 tests pass
  • deploy update --help shows --watch option
  • Manual test against a real server

Closes #20

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator

@hailangvn hailangvn left a comment

Choose a reason for hiding this comment

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

Thanks for the work. Please consider the change. Thank you.

Comment thread tests/test_update_watch.py Outdated
Comment thread tests/test_update_watch.py
Comment thread tests/test_update_watch.py Outdated
After a successful update, stream service logs via journalctl when
--watch is passed. Ctrl+C stops the log tail cleanly.

- executor: add stream() method for long-lived commands that pipe
  output directly to the terminal without capturing
- update: add --watch flag; calls journalctl --user -u <instance> -f
- tests: verify stream() is called with the right command, not called
  without --watch, and KeyboardInterrupt is handled gracefully

Closes #20

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@xaviedoanhduy xaviedoanhduy force-pushed the feat/update-watch-flag branch from ea1bfd3 to ece738f Compare May 5, 2026 03:46
@xaviedoanhduy
Copy link
Copy Markdown
Member Author

hi @hailangvn, I've already applied then
thanks for the advice!

@hailangvn hailangvn merged commit c235923 into main May 5, 2026
5 checks passed
@hailangvn hailangvn deleted the feat/update-watch-flag branch May 5, 2026 04:06
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.

new parameter on command update: --watch

2 participants