-
-
Notifications
You must be signed in to change notification settings - Fork 95
Make the start command print the endpoint on stdout #1271
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
Conversation
This needs a changelog entry, and it also needs the start command documentation to be updated accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a not-so-nice hack. Let's try to find an alternative, or at least make it conditional on a given flag that we have to pass.
This allow us to write: coproc nodefd {
vast --verbosity=quiet -e :0 start
}
read -u "${nodefd[0]}" endpoint
# node is listening now
vast -e $endpoint status
...
vast -e $endpoint stop To me this seems like very reasonable behavior and definitely not a hack. Note that reading from |
I understand where you are coming from, but I disagree that this warrants unconditional printing to stdout. Does anything speak against introducing an option that triggers this behavior, e.g., Also, how does your patch interact with log level "quiet"? |
To me, this feels like the proper way to solve this problem. It's the natural way to solve it for improved scriptability. However, I also agree that this should be behind a flag, e.g.,
It shouldn't have anything to do with log levels, this is printing to stdout so it can be processed by the caller. It necessarily has to be on a separate channels from regular log output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few word smithing tweaks.
This is helpful for test scripts that pass in `:0` to get a random free port allocated from the operating system.
6921755
to
00536d1
Compare
📔 Description
This is helpful for test scripts that pass in
:0
to get a random free port allocated from the operating system.📝 Checklist