Skip to content

Conversation

@ttekampe
Copy link
Contributor

@ttekampe ttekampe commented Feb 17, 2020

  • ❗ Have you followed the guidelines in the Contributing to DVC list?

  • πŸ“– Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.

  • ❌ Have you checked DeepSource, CodeClimate, and other sanity checks below? We consider their findings recommendatory and don't expect everything to be addressed. Please review them carefully and fix those that actually improve code or fix bugs.

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

very small change that fixes #3344

@efiop
Copy link
Contributor

efiop commented Feb 17, 2020

Hi @ttekampe !

Thanks for the PR! Looks like 1 test on windows is failing, due to some caplog misuse on our side. We'll take a look soon.

@ttekampe
Copy link
Contributor Author

Hi,

thanks a lot for the prompt response and also for maintaining this nice package!

dvc/logger.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How noisy is gitpython (or, similar dependencies) on logging, @efiop? We might need to explicitly disable those for good, otherwise, it might mess with cli commands(?).

We need to reset loglevel of moto to logging.CRITICAL: getmoto/moto#2535, or just disable other loggers during test.

Copy link
Contributor

@efiop efiop Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skshetry They are indeed fairly noisy. Maybe let's disable_existing_loggers in CLI and not touch anything in API? We do a similar thingy with some warnings in dvc/__init__.py, but that is rather incorrect. We should disable logs and warnings in dvc/main.py::main() most likely(this is where we init our log anyways). What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, handling in main.py is better. The question is, should we be explicitly disable other loggers there or disable every loggers except of DVC in the main.py?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skshetry I would just disable everything except DVC, to avoid chasing every weird dependency logger out there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note regarding adjustment of tests: If we disable all the loggers in main.py, tests where we do not work with main() such as Repo.push, etc will have all other loggers enabled. So, we might need to disable some loggers on the tests as well (such as moto which is making a test fail at the moment).

@gurobokum
Copy link
Contributor

Thank you for your issue and PR, @ttekampe ! πŸ™Œ
I've applied the changes which were requested by @efiop and @skshetry, let wait what they say about it

@gurobokum gurobokum force-pushed the master branch 2 times, most recently from 2a5704b to 18f70ac Compare February 25, 2020 23:43
@gurobokum gurobokum force-pushed the master branch 2 times, most recently from f2bf2c7 to 2ad8431 Compare February 26, 2020 18:33
@efiop efiop merged commit de453ab into treeverse:master Feb 27, 2020
# see https://github.com/iterative/dvc/issues/3167
git_logger = logging.getLogger("git")
git_logger.setLevel(logging.CRITICAL)
disable_other_loggers()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great if we could move this to conftests. Not super important at the moment, but it does not belong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dvc disables logging of other packages

4 participants