Bug #5652
closed[SDKs] There is no way to silence arv-put and arv-get
Description
On successful upload, 'arv-put' spits out a message of the form "Collection saved ...". There is no way to silence this output short of redirecting stderr to /dev/null. 'arv-put' and 'arv-get' should at least have an option to silence non-error stderr messages.
This came up in the context of trying to automate 'arv-put' upload through a cron job. Since 'arv-put' sends a message on successful upload to keep, the only way to silence spurious email reporting is to redirect stderr to /dev/null, precluding the possibility of catching real errors.
Updated by Brett Smith almost 10 years ago
- Subject changed from There is no way to silence arv-put and arv-get to [SDKs] There is no way to silence arv-put and arv-get
- Category set to SDKs
- Target version changed from Bug Triage to Arvados Future Sprints
- Story points set to 0.5
Updated by Tom Morris over 7 years ago
- Assigned To set to Lucas Di Pentima
- Target version changed from Arvados Future Sprints to 2017-07-19 sprint
Updated by Lucas Di Pentima over 7 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 7 years ago
Updates at 446e64dc1
Test run: https://ci.curoverse.com/job/developer-run-tests/382/ (not sure if they're working now)
Added --silent
flag to arv-put
so that it doesn't produce any output on normal operations.
Added related tests.
For the arv-get
command, I believe that passing the already existing --no-progress
flag would produce the desired outcome.
Updated by Lucas Di Pentima over 7 years ago
Updates at 03eee1573
Test run: https://ci.curoverse.com/job/developer-run-tests/383/
Added test to prove that arv-get
does not write the progress when stderr is not a tty.
Updated by Radhika Chippada over 7 years ago
- "Do not produce any output unless an error happens." => "Do not print any debug messages to console. (Any error messages will still be displayed.)" ?
- test_no_progress_when_stderr_not_a_tty
Can you please throw in a new line between the two test blocks (is tty and not tty)? Also, moving the comment “Confirm that progress is written to stderr when is a tty” and its counterpart to before setting the tty flag might improve readability of each of the code blocks
- test_silent_mode => test_silent_mode_no_errors? Also, you might want to consider saying "no console output will be printed" instead of "no output will be printed" in the comments in the tests.
Thanks.
Updated by Lucas Di Pentima over 7 years ago
All suggestions addressed at 18f6483ff
Also merged master, so the new test run is here: https://ci.curoverse.com/job/developer-run-tests/384/
Updated by Lucas Di Pentima over 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:247d202b57d7c65e4192e0667446d533e552bed7.