-
Notifications
You must be signed in to change notification settings - Fork 134
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
Rethinking environment handling #160
Comments
Right. I think we ended up getting these mental models muddled together when adding I think your mental model outlined makes sense, but can we get some contributors to throw in concrete use cases so we're not just talking abstractly? @cmd-ntrf ? @zonca ? @jupyterhub/designers ? |
I think this is a good idea. |
I implemented this in resurrected PR #119 It's a bit annoying that this changes semantics yet again, but I think it's better to get it done before the release. Next up: we could add
... maybe for security this just shouldn't be added, since it will just lead to people doing the above - or something similar like leaking tokens by /proc/*/cmdline... |
I think we need to rethink environment handling:
Currently there is
req_keepvars
which sets{{keepvars}}
in the batch script to a comma separated list, but does not add them to the environment itself. The environment which is gotten from.get_env()
which comes from JupyterHub, and JupyterHub gives only what is needed.Problems:
req_keepvars
doesn't add new variables to the env dict which is passed to spawnersI am working on rewrite (started from #119 long ago) to improve things. But it's become clear that we need a new mental model of how the variables even work.
Here is what I propose:
.get_env()
(get_env
is a JH concept)req_keepvars
, which is only the extra variables which should be added, not the defalut.req_keepvars_default
which take the place of oldreq_keepvars
. Or this can just be left out (my first implementation will have it to avoid too many problems..get_env()
admin_environment
which takes the same form asreq_keepvars
.run_command()
(which executes the batch commands, poll commands, cancel commands, and so on) always gets the admin environment{{keepvars}}
to limit what the user has access to.What do you think?
The text was updated successfully, but these errors were encountered: