Skip to content

Commit 3c74a19

Browse files
authored
delete PATH env conflict with container (#1225)
1 parent 7901422 commit 3c74a19

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

enterprise_gateway/services/kernels/handlers.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ async def post(self):
5454
if model is not None and "env" in model:
5555
if not isinstance(model["env"], dict):
5656
raise tornado.web.HTTPError(400)
57-
# Start with the PATH from the current env. Do not provide the entire environment
58-
# which might contain server secrets that should not be passed to kernels.
59-
env = {"PATH": os.getenv("PATH", "")}
57+
6058
# Transfer inherited environment variables from current process
61-
env.update(
62-
{key: value for key, value in os.environ.items() if key in self.inherited_envs}
63-
)
59+
env = {key: value for key, value in os.environ.items() if key in self.inherited_envs}
60+
6461
# Allow all KERNEL_* envs and those specified in client_envs and set from client. If this EG
6562
# instance is configured to accept all envs in the payload (i.e., client_envs == '*'), go ahead
6663
# and add those keys to the "working" allowed_envs list, otherwise, just transfer the configured envs.

0 commit comments

Comments
 (0)