Bug #22401
closedcrunch-run --list (with no additional args) should not read from stdin
Description
crunch-run --list can be a helpful tool for an admin during troubleshooting. However, that currently hangs waiting to read an instance price list from stdin. crunch-run --list </dev/null works, but an admin should not need to remember that.
Propose changing the default mode to "don't read from stdin" (admin-friendly), and update arvados-dispatch-cloud to pass an additional argument (--stdin=prices?) to enable the price list update behavior.
Updated by Brett Smith over 1 year ago
Tom Clegg wrote:
Propose changing the default mode to "don't read from stdin" (admin-friendly), and update
arvados-dispatch-cloudto pass an additional argument (--stdin=prices?) to enable the price list update behavior.
Maybe decide based on stdin isatty?
Updated by Tom Clegg over 1 year ago
- Related to Bug #22400: broken paging logic causes arvados-dispatch-cloud to hang at startup while looking up spot prices added
Updated by Tom Clegg over 1 year ago
Brett Smith wrote in #note-1:
Maybe decide based on stdin isatty?
Hm. That would address the interactive use case without changing the a-d-c end, although it could still leave surprising behavior for scripts to discover later. Although I don't have a specific problem in mind, I'm also a little worried that ssh/pty stuff could cause this to make the wrong choice eventually.
Given the self-deploy version sync situation, I think an explicit command line argument would be more friendly/predictable.
Updated by Tom Clegg 2 months ago
- Status changed from New to In Progress
22401-crunch-run-stdin-arg @ 8a16bf45806c0bdf491881b3b29674afb2bed82d -- developer-run-tests: #5007
Updated by Brett Smith 2 months ago
Tom Clegg wrote in #note-4:
22401-crunch-run-stdin-arg @ 8a16bf45806c0bdf491881b3b29674afb2bed82d -- developer-run-tests: #5007
What's here LGTM. Would it be a reasonable amount of work to get a test for --list without stdin?
Updated by Tom Clegg 2 months ago
Yes.
22401-crunch-run-stdin-arg @ 93f41fcedd72a811184bd401f46c8e6b39ce39fe -- developer-run-tests: #5011
Updated by Brett Smith 2 months ago
Tom Clegg wrote in #note-8:
22401-crunch-run-stdin-arg @ 93f41fcedd72a811184bd401f46c8e6b39ce39fe -- developer-run-tests: #5011
LGTM, as long as tests pass you're good to merge. Thanks.