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

[pantsd] In long-running processes, logging from PantsDaemon and its services leaks to the client. #7669

Closed
blorente opened this issue May 7, 2019 · 1 comment
Assignees

Comments

@blorente
Copy link
Contributor

blorente commented May 7, 2019

After #7596, we have the case where, when DaemonPantsRunner sets up logging to redirect stdio through nailgun, the logging is set up globally. Therefore, we have the case where ouput from the daemon (say, a filesystem event) will get logged in the client, like so:

$ ./pants --enable-pantsd repl examples/src/python/example/hello::

14:43:21 00:00 [main]
...
14:43:25 00:04       [repl]

Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> a = 2 + 3
>>> 13:44:00 [INFO] enqueuing 1 changes for subscription all_files
13:44:00 [WARN] invalidation: cleared 2 and dirtied 254 nodes for: {"BUILD.tools", ""}

We may be able to use thread-local logging to ameliorate this issue, since it's a good proxy to determine whether a log statement is in a pants run (and therefore should go through nailgun to the client) or should go to the daemon.

@blorente blorente added this to the Daemon Backlog milestone May 7, 2019
@blorente blorente added the pantsd label May 7, 2019
@blorente blorente changed the title In long-running processes, logging from PantsDaemon and its services leaks to the client. [pantsd] In long-running processes, logging from PantsDaemon and its services leaks to the client. May 7, 2019
@blorente
Copy link
Contributor Author

blorente commented Jul 1, 2019

Fixed

@blorente blorente closed this as completed Jul 1, 2019
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

No branches or pull requests

2 participants