-
Notifications
You must be signed in to change notification settings - Fork 166
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
Underscores disappeared for y -> ies plurals #376
Comments
@cben I think the tweaked fallback is good. It makes more sense to me to have |
Fixes ManageIQ#376. Partially undoes 783c58b.
Fixes ManageIQ#376. Partially undoes 783c58b.
The plot thickens (out-of-scope for this issue — this one is just about disappeared methods — but continuing here as we're already discussing this):
(both => opened openshift/origin#21668 to get clarification on this collision. Previous behaviour ignored
with last one arbitrarily winning for Up to openshift v3.6, it also had a 2nd kind collision:
Amusingly, this one does not result in method collision, because only the former gets underscores:
In theory, the generic fallback is useful for CRDs, but looking at these examples it's mostly harmful 😒 Perhaps cleanest solution is special-casing |
OK, |
4.1.0 includes #366 that broke method names for plurals that are not strict suffix of the singular kind.
Differences between method names in kubeclient 4.0.0 to 4.1.0, across multiple kubernetes & openshift versions:
https://gist.github.com/cben/344a0c7bf74ea50f185c29b52fe0678f#file-changes-diff
network_policy network_policies
becamenetworkpolicy networkpolicies
.pod_security_policy pod_security_policies
becamepodsecuritypolicy podsecuritypolicies
.egress_network_policy egress_network_policies
becameegressnetworkpolicy egressnetworkpolicies
.cluster_policy cluster_policies
becameclusterpolicy clusterpolicies
.network_policy network_policies
becamenetworkpolicy networkpolicies
.it's not in principle limited to
y
->ies
plurals, e.g. if you had a CRD withBigDatum
/bigdata
then methods werebig_datum big_data
previously and becamebigdatum bigdata
in 4.1.0.I want to fix the above ASAP in 4.1.1, restoring the underscores.
Other change that I'd say
is a bugsorry meant isn't a bug:Entities where
kind
is inconsistent with pluralname
previously were skipped — no methods were defined for them:ReplicationControllerDummy replicationcontrollers
(extensions/v1beta1)DeploymentConfig generatedeploymentconfigs
(oapi/v1)Template processedtemplates
(template.openshift.io/v1, oapi/v1)Now these always get "fallback" methods defined — using
kind.downcase
andname
, with no underscores attempted.This change I kinda intended. cc @masayag — you're tweaking this fallback in #373 — do you agree this last fallback is good, or is there a reason we revert these as well in 4.1.1?
The text was updated successfully, but these errors were encountered: