Bug #5652

[SDKs] There is no way to silence arv-put and arv-get

Added by Abram Connelly over 2 years ago. Updated 7 days ago.

Status:ResolvedStart date:04/03/2015
Priority:NormalDue date:
Assignee:Lucas Di Pentima% Done:

100%

Category:SDKs
Target version:2017-07-19 sprint
Story points0.5Remaining (hours)0.00 hour
Velocity based estimate-

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.


Subtasks

Task #11939: Review 5652-arvputget-silent-modeResolvedRadhika Chippada

Associated revisions

Revision 247d202b
Added by Lucas Di Pentima 7 days ago

Merge branch '5652-arvputget-silent-mode'
Closes #5652

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <>

History

#1 Updated by Brett Smith over 2 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

#2 Updated by Tom Morris 19 days ago

  • Assignee set to Lucas Di Pentima
  • Target version changed from Arvados Future Sprints to 2017-07-19 sprint

#3 Updated by Lucas Di Pentima 12 days ago

  • Status changed from New to In Progress

#4 Updated by Lucas Di Pentima 12 days 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.

#5 Updated by Lucas Di Pentima 11 days 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.

#6 Updated by Radhika Chippada 7 days 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.

#7 Updated by Lucas Di Pentima 7 days 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/

#8 Updated by Lucas Di Pentima 7 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:247d202b57d7c65e4192e0667446d533e552bed7.

Also available in: Atom PDF