Project

General

Profile

Actions

Bug #5652

closed

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

Added by Abram Connelly about 9 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
0.5

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 1 (0 open1 closed)

Task #11939: Review 5652-arvputget-silent-modeResolvedRadhika Chippada04/03/2015Actions
Actions #1

Updated by Brett Smith about 9 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
Actions #2

Updated by Tom Morris almost 7 years ago

  • Assigned To set to Lucas Di Pentima
  • Target version changed from Arvados Future Sprints to 2017-07-19 sprint
Actions #3

Updated by Lucas Di Pentima almost 7 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Lucas Di Pentima almost 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.

Actions #5

Updated by Lucas Di Pentima almost 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.

Actions #6

Updated by Radhika Chippada almost 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.

Actions #7

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

Actions #8

Updated by Lucas Di Pentima almost 7 years ago

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

Applied in changeset arvados|commit:247d202b57d7c65e4192e0667446d533e552bed7.

Actions

Also available in: Atom PDF