You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It gets method names like get_apiservice, get_apiservices.
The updated algorithm on master branch correctly splits underscore_entity("APIService") -> "api_service".
However, parse_definition computes prefix it can match against the given lowercase plural, up to the last capital letter.
Normally you get e.g. "NetworkP" + "olicy"/"olicies" -> "network_p" + "olicy"/"olicies".
But when prefix is all uppercase e.g. "APIS", we compute underscore_entity("APIS") -> "apis", to which we append "ervice"/"ervices" to construct "apiservice", "apiservices" ☹️
We have all the information here that "Service" is a separate word, but we're not passing it into underscore_entity. 🤔
The text was updated successfully, but these errors were encountered:
cben
added a commit
to cben/kubeclient
that referenced
this issue
Feb 12, 2023
Upper-only `DNS` and upper-at-end `ServiceCA` seen in operator.openshift.io/v1.
TODO: found bug ManageIQ#605 - failing test for `APIService`.
Swapped expected, actual to minitest's order (for less confusing messages).
Funnily enough, this was the motivating case for the original change #355, but all the pretty tables where I listed it as changed there were based on testing underscore_entity and not the actual method names produced by parse_definition 😳
EDIT: there were several PRs touching this code area around same time, so it's possible this worked originally and got lost later in rebases? Anyway, the incomplete test coverage is what allowed this.
It gets method names like get_apiservice, get_apiservices.
underscore_entity("APIService")
->"api_service"
.parse_definition
computes prefix it can match against the given lowercase plural, up to the last capital letter.underscore_entity("APIS")
->"apis"
, to which we append "ervice"/"ervices" to construct "apiservice", "apiservices"We have all the information here that "Service" is a separate word, but we're not passing it into
underscore_entity
. 🤔The text was updated successfully, but these errors were encountered: