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
Schema for multimaps is wrong #4487
Labels
Milestone
Comments
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 12, 2022
Upgraded sundrio and added a test to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 12, 2022
Upgraded sundrio and added a test to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 14, 2022
Upgraded sundrio and added a test to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 14, 2022
…ses), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
11 tasks
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 18, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 18, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 18, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
xRodney
added a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 19, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
manusa
pushed a commit
to xRodney/kubernetes-client
that referenced
this issue
Oct 19, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes fabric8io#4357 Fixes fabric8io#4487
manusa
pushed a commit
that referenced
this issue
Oct 19, 2022
…es), schema for multimaps is wrong Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps. A very similar code was also present in crd-generator, also suffering from the same bug. Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm. A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly. Fixes #4357 Fixes #4487
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello again,
after #4413 will have been merged, crd generator will no longer fail on multimaps, which are present in keycloak-operator crds.
Unfortunately, they will still be generated wrong.
Fabric8 Kubernetes Client version
SNAPSHOT
Steps to reproduce
(same as in #4357)
The field
test3
is treated as if it wasMap<String, String>
:Expected behavior
The field
test3
should be treated as if it wasMap<String, List<String>>
:Runtime
other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
other (please specify in additional context)
Fabric8 Kubernetes Client Logs
No response
Additional context
Compared to #4413, this is rather low severity, as it can easily be worked around using
@SchemaFrom
and/or@SchemaSwap
.In my assessment, this should be improved in sundrio and I have already filed an issue there (sundrio/sundrio#341) and a PR (sundrio/sundrio#342). If I'm right and my contribution is merged, here we should only upgrade sundrio and maybe add a test and a changelog entry.
The text was updated successfully, but these errors were encountered: