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

Do not log environment variables passed to kernels #1437

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jupyter_server/services/kernels/kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ async def _async_start_kernel( # type:ignore[override]
kernel.reason = "" # type:ignore[attr-defined]
kernel.last_activity = utcnow() # type:ignore[attr-defined]
self.log.info("Kernel started: %s", kernel_id)
self.log.debug("Kernel args: %r", kwargs)
self.log.debug("Kernel args: %r", {k: v for k, v in kwargs.items() if k != "env"})
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is fine. Another option would be to log what keys are being specified, but not the values. If you see something like $PYTHONPATH or $LD_LIBRARY_PATH etc. in there, it can be an important fact in debugging.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, let me know what you think about dcde218


# Increase the metric of number of kernels running
# for the relevant kernel type by 1
Expand Down
Loading