readiness_probe does not respect working_dir
Closed this issue · 3 comments
joefiorini commented
Defect
Make sure that these boxes are checked before submitting your issue -- thank you!
- Included the relevant configuration snippet
- Included the relevant process-compose log (log location:
process-compose info
) - Included a [Minimal, Complete, and Verifiable example] (https://stackoverflow.com/help/mcve)
Version of process-compose
:
OS environment:
Steps or code to reproduce the issue:
Config:
processes:
clientA:
working_dir: "clientA"
is_daemon: true
command: "sleep 10 && touch ready"
shutdown:
command: "rm ready"
readiness_probe:
exec:
command: "echo $(pwd) > ready-check && test -f ready"
clientB:
command: "echo all done!"
depends_on:
parent:
condition: process_healthy
Expected result:
- clientA process becomes ready and clientB prints "all done"
- File
ready-check
exists in folderclientA
Actual result:
clientA process never becomes ready and log says:
process-compose.log
23-07-19 09:41:34.127 INF Process Compose v0.51.4
23-07-19 09:41:34.127 INF Global shell command: bash -c
23-07-19 09:41:34.127 INF Loaded project from /var/home/joe/Projects/code/process-compose-working_dir-mcve/process-compose.yaml
23-07-19 09:41:34.127 INF start http server listening :8080
23-07-19 09:41:34.127 DBG Spinning up 2 processes. Order: ["clientA" "clientB"]
23-07-19 09:41:34.127 INF clientB is waiting for clientA to be healthy
23-07-19 09:41:34.127 DBG Shortcuts loaded from /var/home/joe/.config/process-compose/shortcuts.yml
23-07-19 09:41:34.128 INF clientA started
23-07-19 09:41:34.128 DBG clientA_ready_probe started monitoring
23-07-19 09:41:44.130 INF clientA exited with status 0
23-07-19 09:41:54.129 INF clientA is not ready anymore - exit status 1
23-07-19 09:41:54.129 DBG terminating clientA with timeout 10 ...
23-07-19 09:41:54.129 ERR Process clientA was aborted and won't become ready
23-07-19 09:41:54.130 ERR Error: process clientB depended on clientA to become ready, but it was terminated
23-07-19 09:41:54.130 ERR Error: process clientB won't run
23-07-19 09:41:54.131 ERR terminating clientA with timeout 10 failed - exit status 1
23-07-19 09:41:54.131 INF Project completed
23-07-19 09:41:55.131 INF Thank you for using process-compose
- File
ready-check
exists in parent folder, not inclientA
- clientB never prints "all done" since clientA never becomes ready
❯ ls clientA/
ready
❯ ls .
clientA/ process-compose.yaml ready-check
MCVE: https://github.com/joefiorini/process-compose-working_dir-mcve
joefiorini commented
It appears this is also true for the shutdown command.
F1bonacc1 commented
Good catch.
Will be fixed in the next release.
F1bonacc1 commented
Should be fixed in v0.60.0
Feel free to reopen if it doesn't work as expected.