-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate process ready or failure states by process output pattern match #102
Comments
The readiness_probe.exec route is the way to go. Define a log file location for the process and use grep on it to check for the predicate to match. |
You can probably (not sure what is the exact output of your watcher) achieve this with the following configuration: processes:
watcher:
command: "sleep 1 && echo SUCCESS && sleep 9"
log_location: ./watcher.log
readiness_probe:
exec:
command: "grep -q SUCCESS ./watcher.log"
initial_delay_seconds: 1
period_seconds: 1
timeout_seconds: 1
success_threshold: 1
wait4it:
command: "echo watcher is healthy"
depends_on:
watcher:
condition: process_healthy But... If that's an issue I can add a flag to the process configuration, to flush the log on each line (default |
Hey both - forgot to follow up here. Thanks for taking the time to respond! Will explore that approach. |
Feature Request
Use Case:
I have a couple build processes that watch files and rebuild, they don't setup any server, but they do write some "SUCCESS" message to stdout.
Would be cool if I could define something in the
.yaml
file to match against a pattern for indicating ready/failureProposed Change:
An extension to
readiness_probe
allowing something like anstdout
regex match.Who Benefits From The Change(s)?
People who's process doesn't expose a health check endpoint, but still would like to use readiness to kick off other processes.
Alternative Approaches
This might be implementable by
exec
currently? Might just need a recipe to show how it could workThe text was updated successfully, but these errors were encountered: