kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

PodSpec should be considered Buildable in all extensions

Open iocanel opened this issue 4 years ago • 3 comments

The issue is that PodSpec which is part of the core model, is also used in extensions (e.g. knative). By not considering it Buidlable, visitors are broken causing lots of issues in downstream projects.

A manifestation of the issue: https://github.com/quarkusio/quarkus/issues/16376

So, PodSpec needs to be included. Ideally, we should be more to be more generic and somehow include all core types.

iocanel avatar Apr 09 '21 06:04 iocanel

From discussion:

  • Inheritance doesn't seem to be supported by json-schema: https://github.com/json-schema-org/json-schema-spec/issues/348

    So, I hope that helped. Schemas are not describing objects, they are a collection of constraints. So, thinking in terms of inheritance doesn't work.

  • Inheritance would be a great advantage for Visitors. e.g. a PodSpec visitor would also apply to all RevisionSpecBuilder(s).

Approaches for the PodSpec/RevisionSpec class with our current setup could be:

  • Manually overriding RevisionSpec (delete generated class), and make it extend PodSpec
  • Investigate the possibility to add some sort of meta-data to the generated json-schema to indicate that an object inherits another and then use our processors to generate the java sources accordingly.

manusa avatar Apr 09 '21 07:04 manusa

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

stale[bot] avatar Jul 08 '21 07:07 stale[bot]

Given the the referenced issue has been worked around I removed my self from the assignee list.

iocanel avatar Feb 18 '22 08:02 iocanel

@iocanel is this related to the changes in https://github.com/sundrio/sundrio/issues/374 and https://github.com/sundrio/sundrio/issues/350 or does there still need to be an explicit declaration that PodSpec is Buildable?

shawkins avatar May 22 '23 20:05 shawkins

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

stale[bot] avatar Aug 21 '23 22:08 stale[bot]