Skip to content
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

fix short_names -> shortNames #25

Merged
merged 1 commit into from
Jan 12, 2019

Conversation

mindreframer
Copy link
Contributor

problem:

  • currently short names are completely ignored by k8s

solution:

  • use camelcase. It looks a bit weird in Elixir, but works
  • alternative would be to dynamically adjust casing on all field names in requests / responses and this might introduce own problems. imho: keep it KISS

problem: 
- currently short names are completely ignored by k8s


solution:
- use camelcase writing. It looks a bit weird in Elixir, but this the simplest fix. 
- alternative would be to dynamically adjust casing on all field names in requests / responses and this might introduce own problems. imho: keep it `KISS`
@coryodaniel
Copy link
Owner

I think this kinda ties into #23 ... We could have a function in the Naming (or similar) module that snake_case <=> camelCase map keys. I assume this will start cropping up more and more as features are added. Might also be nice to auto snake_case HTTP responses and camelCase requests in #22.

Thoughts?

@mindreframer
Copy link
Contributor Author

@coryodaniel I understand your arguments yet this can become a major yak shaving pit fall...

snake_case <=> camelCase conversion is not 100% reversible and will require some fancy rules / exceptions (all uppercase? URL ? ID? UUID) and all kinda little workarounds.... In theory nice, in practice it works 99% and bites you with weird bugs.

Maybe I'm overestimating the danger here, yet my gut feeling tells me to stick to most simplest approach possible.
And there are some a bit cooler things to implement than reliable key conversion snake_case <=> camelCase within k8s lingo. IMHO if we stick to Kubernetes wording / casing 100%, there is no need to explain or implement things.

Also I'm a bit in crunch mode, so i need working simple things fast ... 😅

@coryodaniel
Copy link
Owner

Valid point. We should keep this on the radar.

It’s looking especially difficult w annotations, since the let’s are often domain names - we’d probably need to skip annotations altogether.

@coryodaniel coryodaniel merged commit 3f1e926 into coryodaniel:master Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants