odo icon indicating copy to clipboard operation
odo copied to clipboard

manually trigger file sync in `odo dev`

Open kadel opened this issue 3 years ago • 3 comments

User Story

  • As an odo user running odo dev --no-watch
  • I want to be able to trigger push and restart on demand
  • So that I can trigger push only after I made multiple edits, because I don't need to see every single small change and on a complex application it can be expensive to trigger rebuild

Acceptance Criteria

  1. This issue
  • [ ] when odo dev is running user should be able to trigger push by pressing a key (p).
  • [ ] odo dev output should inform user about this option
  • [ ] triggering push on-demand should be possible regardless if odo dev is running with or without --no-watch
  1. How to trigger the file sync https://github.com/redhat-developer/odo/issues/5986

/kind user-story

kadel avatar Apr 06 '22 09:04 kadel

question exclamation there should be a way to trigger sync "from the outside" (for example by sending signal to odo dev process (what about Windows?), or running new odo command in another terminal for example odo dev --push)

Use sockets to communicate with already running odo dev --no-watch instance.(Dharmit) Let user(adapters team) specify which port to use for odo dev, so that it becomes easier to communicate.(Tomas) Or create an API to communicate with odo to trigger it.(Tomas) We could use signals, but it would be a problem for Windows machines.

valaparthvi avatar Jul 28 '22 13:07 valaparthvi

I want to be able to trigger push and restart on demand

Do what odo dev does, but with manual trigger.

valaparthvi avatar Jul 28 '22 13:07 valaparthvi

Thoughts on integration tests?(Armel) https://github.com/micmonay/keybd_event could be used.

valaparthvi avatar Jul 28 '22 13:07 valaparthvi

I've managed to get a POC done with https://github.com/cdrage/odo/tree/manual-sync

So I'll take this up! Was actually quite straight-forward to implement.

cdrage avatar Aug 17 '22 19:08 cdrage

Integration tests remain to complete.

Estimation for remaining tasks: 2

rm3l avatar Aug 31 '22 13:08 rm3l