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
fix (osgi) : Fix OSGi startup exceptions while using KubernetesClient/OpenShiftClient #4459
fix (osgi) : Fix OSGi startup exceptions while using KubernetesClient/OpenShiftClient #4459
Conversation
<osgi.provide-capability> | ||
osgi.serviceloader; | ||
osgi.serviceloader=io.fabric8.kubernetes.client.extension.ExtensionAdapter, | ||
io.fabric8.kubernetes.client.ServiceToURLProvider | ||
</osgi.provide-capability> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need to be added to any extension that provides SPI capabilities.
d688b8d
to
5370dde
Compare
…ations + Add Provide-Capability field in openshift-client + extensions bundle configurations in order to resolve SPIFly related NPE (reported in fabric8io#3890) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…lient Remove ExtensionAdapter reference from ManagedKubernetesClient, no provider is exposed for ExtensionAdapter interface in kubernetes-client module. bindExtensionAdapter and unbindExtensionAdapter are throwing NullPointerException during startup.
5370dde
to
818ca2d
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi @manusa @rohanKanojia, We've found a issue with quarkus-kubernetes-client (version 2.14.0.CR1) where a Provider Not found issue is happening:
Do you guys think that it is related with this change? @BuildStep
void processKnative(BuildProducer<ServiceProviderBuildItem> spb) {
spb.produce(new ServiceProviderBuildItem("io.fabric8.kubernetes.client.extension.ExtensionAdapter", KnativeExtensionAdapter.class.getName()));
} Is this the right way to have the knative client properly working in native mode, or should this fix be in the quarkus-kubernetes-client? Thanks. |
@spolti : I'm not entirely sure. Could you please provide complete stacktrace? As far as I remember this error was coming from SPIFly. Does it happen in your case as well? |
Hi @rohanKanojia, here us the stacktrace:
I am not sure what SPIFly is, but in my case, it is happening with custom service discovery that uses quarkus-kubernetes-client and the io.fabric8:knative-client. In the current Quarkus version this issue is not happening, only with the 2.14.0.CR1 that uses the fabric8 6.2. |
This has to do with SPI and not OSGi. Have you reported this in the Quarkus repo?
I'm assuming that the issue is happening in native mode then. In this case we need to register any SPI provided implementations following the same pattern you showed. |
Hi @manusa,
Not yet, before that I wanted to confirm if that is a issue, or for native we just need to add the Extension producer.
Yes, it is native. |
The thing is that this is for the Knative extension, which AFAIR is not part of the Quarkus client distribution. |
sure, thanks @manusa. |
Description
bindExtensionAdapter
andbindExtensionAdapter
are throwingNullPointerException
during startup.Provide-Capability
field inopenshift-client
and other extensions bundle configurations in order to resolve SPIFly relatedNPE
(reported in Errors in the Karaf platform logs #3890)See also
Type of change
test, version modification, documentation, etc.)
Checklist