Skip to content
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

pseudo-tty verbosity #2664

Closed
casperdcl opened this issue Oct 24, 2019 · 11 comments
Closed

pseudo-tty verbosity #2664

casperdcl opened this issue Oct 24, 2019 · 11 comments
Labels
A: cli Related to the CLI discussion requires active participation to reach a conclusion ui user interface / interaction

Comments

@casperdcl
Copy link
Contributor

casperdcl commented Oct 24, 2019

continuing discussion from #2659,

Envs like gitlab don't support carriage return \r so progressbar updates get printed on new lines (https://github.com/tqdm/tqdm#faq-and-known-issues).

possible solutions

To disable and/or reduce progress frequency:

  • check os.environ for gitlab (and other CI?) env vars
  • support a new dvc env var
  • add another dvc log level
  • document redirecting stderr to file (dvc ... 2>/tmp/dvc-stderr.log)
  • document redirecting stderr to tee (dvc ... 2>&1 | tee)

related to #2329, #2332

@casperdcl casperdcl added the ui user interface / interaction label Oct 24, 2019
@efiop
Copy link
Contributor

efiop commented Oct 24, 2019

I wonder how people using gitlab are dealing with stuff like wget and other tools that have progress bars? I have run into similar issues previously and using -q with other tools was suitable for me. Or redirecting to a log file and then doing tail log.log when the process is done.

@efiop
Copy link
Contributor

efiop commented Oct 24, 2019

CC @BernMcCarty

@efiop
Copy link
Contributor

efiop commented Oct 24, 2019

Looks like the issue was that -q is not working #2665 , so there is no need for any of those possible solutions.

@BernMcCarty
Copy link

It appears gitlab has known about their \r problem for two years.

@casperdcl
Copy link
Contributor Author

As @BernMcCarty mentions, -q suppresses (or is meant to) more than just progress, which may not be desirable

@BernMcCarty
Copy link

Redirecting stderr to a file in order to get the progress to turn itself off worries me because if there is one thing that I really need to see in my CI logs it is errors. I'd rather manually turn progress off with something like a --no-progress option.

@efiop
Copy link
Contributor

efiop commented Oct 24, 2019

@BernMcCarty I usually do something like:

mycmd &> log.log || tail log.log

that way if mycmd fails, I get the last part of the log with the errors.

@casperdcl
Copy link
Contributor Author

doesn't dvc ... 2>&1 | tee pretty much fix this?

@BernMcCarty
Copy link

@casperdcl I think you are right. Seems to work. Clever.

@casperdcl
Copy link
Contributor Author

much hack such fun

@omesser omesser added discussion requires active participation to reach a conclusion A: cli Related to the CLI labels Apr 25, 2023
@efiop
Copy link
Contributor

efiop commented Dec 8, 2023

closing as stale.

@efiop efiop closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: cli Related to the CLI discussion requires active participation to reach a conclusion ui user interface / interaction
Projects
None yet
Development

No branches or pull requests

4 participants