F1bonacc1 / process-compose

Process Compose is a simple and flexible scheduler and orchestrator to manage non-containerized applications.
https://f1bonacc1.github.io/process-compose/
Apache License 2.0
1.29k stars 50 forks source link

when a task is disabled, the terminal window hangs after quitting #239

Closed thenbe closed 1 month ago

thenbe commented 2 months ago

Defect

Make sure that these boxes are checked before submitting your issue -- thank you!

Version of process-compose:

1.24.0

OS environment:

Steps or code to reproduce the issue:

version: "0.5"

processes:
  api:
    disabled: true # <-- The bug only occurs when this is set to `true`
    command: echo hello
  1. Use the config posted above.
  2. Run process-compose up --keep-project
  3. Attempt to quit process-compose by pressing F10 then enter.
  4. .
    • EXPECTED: process-compose should quit and you should be able to use the shell. You can run echo foo in the same shell. Pressing ctrl+c enters a "new line".
    • ACTUAL: process-compose quits, but the shell is not in a usable state. You are not able to run a command in the same shell. Pressing ctrl+c prints the literal characters ^C on the screen.

Logs

24-08-29 08:00:03.984 INF Process Compose v1.24.0
24-08-29 08:00:03.984 INF Loaded project from /home/nbe/projects/sail/process-compose.yaml
24-08-29 08:00:03.984 INF Global shell command: bash -c
24-08-29 08:00:03.984 INF start http server listening :8080
24-08-29 08:00:03.984 DBG Spinning up 0 processes. Order: []
24-08-29 08:00:03.984 INF Project completed
24-08-29 08:00:03.984 DBG Loaded settings from /home/nbe/.config/process-compose/settings.yaml
24-08-29 08:00:03.985 DBG Shortcuts loaded from /home/nbe/.config/process-compose/shortcuts.yaml
24-08-29 08:00:06.793 DBG Shutting down 0 processes. Order: []
24-08-29 08:00:06.794 INF Thank you for using process-compose

If you have difficulty reproducing this, let me know and I'll record a video.

thenbe commented 2 months ago

I noticed that if I change the value of disabled to false, the issue does not occur; everything works as expected.

version: '0.5'

processes:
  api:
-    disabled: true
+    disabled: false
    command: echo hello

Here are the logs:

24-08-29 08:04:06.147 INF Process Compose v1.24.0
24-08-29 08:04:06.147 INF Loaded project from /home/nbe/projects/sail/process-compose.yaml
24-08-29 08:04:06.147 INF Global shell command: bash -c
24-08-29 08:04:06.147 INF start http server listening :8080
24-08-29 08:04:06.147 DBG Spinning up 1 processes. Order: ["api"]
24-08-29 08:04:06.147 DBG Loaded settings from /home/nbe/.config/process-compose/settings.yaml
24-08-29 08:04:06.147 INF Started command=["bash","-c","echo hello"] process=api
24-08-29 08:04:06.148 DBG Shortcuts loaded from /home/nbe/.config/process-compose/shortcuts.yaml
24-08-29 08:04:06.198 INF Exited exit_code=0 process=api
24-08-29 08:04:06.198 INF Project completed
24-08-29 08:04:07.778 DBG Shutting down 0 processes. Order: []
24-08-29 08:04:08.779 DBG Logs monitoring canceled
24-08-29 08:04:08.779 INF Thank you for using process-compose

Could this line be significant? It does not appear when disabled is set to true.

24-08-29 08:04:08.779 DBG Logs monitoring canceled