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

async cache client fix: don't capture stderr since it contains logs #403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oavdeev
Copy link
Collaborator

@oavdeev oavdeev commented Dec 12, 2023

Cache subprocesses communicate with the main process via stdin/stdout pipe. However it turns out we were also redirecting stderr to stdout, which would unintentionally send a lot of log data there too. It would be typically cause JSONDecodeError on reader side on line 61:

        except JSONDecodeError as ex:
            if self.logger.isEnabledFor(logging.INFO):
                self.logger.info("Message: {}".format(line))

However in some cases that log output might be parseable as JSON which triggers other code paths. This PR fixes stderr redirect

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.

1 participant