Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Decouple Rest model from KameletPopulator #802

Open
lburgazzoli opened this issue Jul 21, 2023 · 1 comment
Open

Decouple Rest model from KameletPopulator #802

lburgazzoli opened this issue Jul 21, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@lburgazzoli
Copy link
Contributor

The Rest model class has a field to hold a KamelPolulator this causes quarkus to report the following warning:

2023-07-21 17:25:53,008 WARN  [io.quarkus.deployment.steps.ReflectiveHierarchyStep] (build-37) Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
        - io.vertx.core.Vertx (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - io.vertx.core.http.HttpClient (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - io.vertx.core.http.WebSocket (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - io.vertx.core.net.ProxyType (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - jakarta.enterprise.inject.Instance (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - javax.net.ssl.KeyManager (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - javax.net.ssl.SSLContext (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - javax.net.ssl.TrustManager (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - okhttp3.OkHttpClient (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - okhttp3.OkHttpClient$Builder (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - okhttp3.Request$Builder (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - okhttp3.WebSocket (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)
        - okio.BufferedSource (source: JacksonProcessor > io.kaoto.backend.camel.model.deployment.kamelet.step.From)

However this is only the top of the iceberg as what happen behind the scene is that a very large amount of classes are added to the list of classes to be registered (because the KamelPolulator has a StepCatalog which has other fields, etc).

At this stage this is only a warning and does not compromise the behavior of the application, however it is likely that a number o classes is registered for refection where it should not be resulting in larger native image and longer build time.

In addition it seems to reveal some design smells as:

Ideally Rest should probably not need KamelPopulator

@stale
Copy link

stale bot commented Oct 19, 2023

🚨This issue has been automatically marked as stale because it has not had recent activity.🚨
If you are still interested in this issue, please, leave a comment stating its current status. Note that if no development resources has been allocated on it, you may need to search for alternative resources to complete it. It will be closed if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant