-
Notifications
You must be signed in to change notification settings - Fork 221
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
wip: simplify and automate forwarding of env vars [server -> kernel] and [gateway -> kernel] #1000
base: main
Are you sure you want to change the base?
wip: simplify and automate forwarding of env vars [server -> kernel] and [gateway -> kernel] #1000
Conversation
…matically determine ENV_FORWARD from kernel env stanza
Hi Max - Thanks for working on this. I'm having some difficulty with the names I also think we need to include deprecation logic because I'm thinking we'd release this in a minor release (2.6) - with the next major release being the transition to kernel provisioners. I suppose such logic would be necessary even if these were to first appear in a major release anyway. Could you please add some surrounding deprecation code? |
@kevin-bates I agree those are a bit more expressive. I was also thinking about maybe Before we get too caught up in dickering over the names, I did want to get your feedback on some design stuff. Ideally, I'd like to simplify and automate the env var forwarding logic to the point where I can get rid of at least one of the existing three related config fields. I ended up trying out ~4-ish different implementations before I started on the current PR. Some possibilities (for clarity I'll use the config field names from current mater): Plan A: ship
|
'Fun' with CRDs!I also looked into replacing 1. a schema defining the
|
See #991 regarding CRDs. If you could take that for a spin that would be awesome. I'll get back to you tomorrow regarding this (env) PR. |
Hey Max, I wanted to get back to you regarding #1000 (comment). I really like the idea behind Plan B for the way it dramatically simplifies things and, as you point out, is perhaps more natural. The concern I have is that it changes the semantics of the env stanza from static values to flowed values, which, for at least some of the env entries are not meant to be the case. However, you address that by saying that those "static" values should be placed into EG and their names configured in the process-whitelist - which makes sense. I suppose where that could run aground would be if there are still kernel-specific values for the same env name. In that case, there's no way to specify that kind of granularity in the process-whitelist. Is that last comment enough to derail things? I suppose we could add a disallowed list such that envs in that list will NOT be propagated to the kernel, yet those same values could still be configured in the kernelspec on a per-kernel basis. Should any such envs get flowed from the client, we would log their exclusion and continue with the request. The other semantic difference this introduces is the difference in behavior between non-EG and EG configurations as a straight Lab/Server installation won't behave this way. I suppose that difference will be more blurred once we have parameterization - so I'm not too worried about that. Regarding plans, I've been thinking we're going to want a 2.6 release prior to the switch to provisioners and I wonder if we could start the deprecation of env-whitelist now and honor both env-whitelist and env-kernelspec (:smile:) simultaneously. We could also do the same in GatewayClient. We'd want to introduce this "disallowed" entry as well. Frankly, I don't think these env-based lists are used that often. What do you think? If you'd like to meet and discuss, I'd be happy to do that as well. Btw, I also like the idea in Plan A where the EG whitelist is posted in the kernelspec response and we have a kind of "protocol" in GatewayClient to look and use that value. That approach introduces far fewer semantic differences and eliminates the client-side trait - which admins spend time coordinating today. The one aspect of things I'd like to retain however, is that all |
Hey @kevin-bates, thanks for the detailed response.
I see your point, but needing to add in an In response to the semantic and other concerns you explain above, I added a new "Plan C" to my earlier post, in which the forward env whitelist gets stored in a new I'll bring up the general problem of eliminating the need for |
@kevin-bates Looking back over your kernel parameterization JEP, I see that the Plan C I suggested is basically the same as your proposal for parameterized environment variables, only without the ability to pass env vars to the "provisioner" (which in this case I assume would be the gateway node) or to specify var "types" |
Hi @telamonian - I hope all is well. I'd like to move forward, in some capacity, on these proposals and am finding myself leaning toward Plan C. I'd like to summarize the possible set of changes, along with considerations when older GatewayClients are in play, etc. Relative to the "future release" comments above, I believe the current state of affairs is that we will have a 3.0 release - that is still based on process proxies - followed by a 4.0 release based on provisioners.
Should we also allow EG to define Does this approach help your use-cases? Do you mind if I proceed with this? (I'm assuming you have limited bandwidth right now.) |
Ok, here's how I think we should proceed in the near term.
Since parameterized kernels will not happen in the process-proxy lifetime, I think much of this PR will need to be part of EG 4.0 - when a switch to kernel provisioners takes place and the entire Jupyter ecosystem can benefit from parameterized kernels. Regarding the Thoughts, or opinions on the above? Please provide input ASAP. Unless I hear otherwise, I will be working on the rename/deprecation changes next week beginning July 19. |
I'm not sure what I was thinking here. Although we can deprecate EG will send the current set of defined Kernel start requests will then filter on that same union of envs, taking any included in GatewayClient will still need to honor |
Sorry for the spam (if anyone is listening), but I'm beginning to think that the ONLY thing we should do for the 3.0 release relative to this discussion is rename the whitelists and nothing more. This is because it introduces too much divergence from Kernel Gateway if we were to remove I'm also hesitant to introduce a field in the Perhaps our time is better spent getting EG 3.0 out (with these options renamed), then focusing on getting the provisioners in place (and dropping process proxies)? |
fixes #957
see discussion at #957