-
Notifications
You must be signed in to change notification settings - Fork 223
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
Types of GatewayClient.env_whitelist and EnterpriseGatewayApp.env_whitelist are not compatible #957
Comments
Hi Max - good catch. I think treating this trait as an actual list is more correct, although that can be a bit more difficult in scripting, etc. Still, I think that's where the change should be made. However, I believe this would qualify as an API change and I wonder if we should deprecate There's also a pending EG 3.0 release on the horizon where we could make a similar name change. That all said, I'm flexible (especially if I'm not doing the work 😄 )! |
Deprecation seems like a good idea to me, but there's already a very complicated story around the 3 similar options:
If we start changing only some of the names around I think it will make it even more confusing. So should we change all of them? Maybe. So that's fairly complicated. Still, the types mismatch thing is a major (or at least a moderate) usability problem; for example, I just wasted half an hour debugging around the fact that Related, how would you feel about bumping the |
I think what you say makes a lot of sense and we should strongly consider these changes (traitlets >= 5 and renames) - after all, a major release is when these things can happen. I'm thinking |
It seems like
|
Getting even more ambitious, it would also be nice if said |
I like the naming suggestions, although I think Does You'd then have:
I totally agree (and love your ambition)! I think it would be nice to have the "factory values" exist as they do in the template, but perhaps we could make the "user values" be built dynamically. It looks like there are looping constructs that could be used, or build the entries in the script itself. That would be great. Yeah, adding piecemeal vars to the yaml file as needed was the minimally viable approach. This would be really useful to have a general flow what's there mechanism. |
Those names sound reasonable. I'll start working on this.
pyyaml is good and flexible, so I think this is the way to go: in k8s_obj['spec']['containers'][0]['env'].append({'name': 'FOO', 'value': 'bar'}) assuming I got the structure of the parsed yaml right. I think the big downside of anything jinja2-based is that it kills every static parser yet invented. Thus any jinja template with conditionals inside loops is going to be both hard to read and finiky to modify. |
ooo, and speaking of pyyaml, it looks like a |
Thank you Max - good points. Because the launch_kubernetes script is actually what is launched by the framework, whatever environment variables are present should be the result of both allowed and inherited settings. However, I now recall that we don't really honor the I think we should try following the Thank you for spending time on this! |
…matically determine ENV_FORWARD from kernel env stanza
…matically determine ENV_FORWARD from kernel env stanza
@kevin-bates Sorry for the delay, work on this is now underway over at #1000 |
It appears that in order to get any use from the
GatewayClient.env_whitelist
and theEnterpriseGatewayApp.env_whitelist
options, their values have to match. This is made somewhat awkward by the fact that theGatewayClient.env_whitelist
option is backed by a unicode traitlet (and is meant to be a comma separated string of values) and theEnterpriseGatewayApp.env_whitelist
is a proper list traitlet. These should match, so one of these should change.@kevin-bates I can submit the PR for this. Should I change
EnterpriseGatewayApp.env_whitelist
to a unicode traitlet, or vice versa?The text was updated successfully, but these errors were encountered: