-
Notifications
You must be signed in to change notification settings - Fork 1
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
DM-45394: Config from a single YAML file (except secrets) #380
Conversation
f7d59ff
to
e900069
Compare
6abdc0a
to
fe1dcb5
Compare
fe1dcb5
to
58f724e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should also change the flock configuration and therefore the business configuration and all of those models to also support camel-case so the entire configuration can be given in camel-case for consistency. As long as you have populate_by_name
set, both snake-case and camel-case will be supported. There's some trick to getting the API documentation correct (snake-case) that I used with Nublado... oh, right, you have to make separate model classes for the loaded configuration that enable the alias generator and inherit from the API models. Unfortunately, I don't know of a way to do it other than code duplication.
I'll leave it up to you whether to do that additional work. I probably would because the inconsistency of camel-case in some parts of the configuration and snake-case elsewhere really bugs me, but that might just be a me problem. :)
a63b1b4
to
de43e19
Compare
This ends up touching a lot of nested models. This commit allows camelCase everywhere that's necessary to specify flocks. I'm not sure how to specify non-aliased versions of this without duplicating the field specifications on a lot of models, since alias generator model config doesn't propagate to submodels (which makes sense). It would be great if we could somehow specify in the models "use the non-aliased name for OpenAPI specs please," but to your point, I don't think there is. I agree that a mix of styles in the app config is nasty, but I'm less put off by the inconsistent style in all of the helm values, as long as all of the app config is snake case. I can justify that in my brain as "this is directly generating a file that gets fed to the app, which is a python app, which likes snake_case, whereas everything outside of this I think the options are:
|
01cc4fc
to
37cd37b
Compare
Meh, that sorta stinks too, it leaks into the helm templates more than I thought: lsst-sqre/phalanx@85938fb |
37cd37b
to
d375c26
Compare
d375c26
to
987765e
Compare
I'm going to defer the work to support camelCase for the autostart config. I agree it would be nice, but I can't immediately do it without duplicating a lot of code, and I'd like to move forward with the metrics stuff. I'm going to merge this now under the auspices of "it doesn't make it worse." |
Phalanx changes are in this PR