Skip to content
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

Shared - Export DummyJolokia or modify JolokiaService to serve hawtio-online #573

Closed
tadayosi opened this issue Sep 26, 2023 · 4 comments
Closed
Labels
area/hawtio-online area/shared kind/enhancement Enhancements that don't necessarily result in a new feature
Milestone

Comments

@tadayosi
Copy link
Member

I have had to copy this into hawtio-online in order to always return an implementation of jolokia, regardless of error. Can we export it, please?

Of course, it might be that a review of ManagedPod might render this mute.

https://github.com/hawtio/hawtio-online/blob/2.x/packages/management-api/src/managed-pod.ts#L21
https://github.com/hawtio/hawtio-online/blob/2.x/packages/management-api/src/managed-pod.ts#L110

Originally posted by @phantomjinx in #569 (comment)

@tadayosi tadayosi added kind/enhancement Enhancements that don't necessarily result in a new feature area/shared labels Sep 26, 2023
@tadayosi
Copy link
Member Author

tadayosi commented Sep 26, 2023

Here are my points:

  • As we discussed, hawtio-online should rather use jolokiaService instead of directly depending on jolokia.js. This way, I don't think we need to export this DummyJolokia class.
  • What's important to discuss here is really that currently jolokiaService is provided as a singleton service, whereas hawtio-online should expect to use multiple Jolokia instances with each distinct connection, because hawtio-online needs to switch to different Jolokia endpoints provided by pods. We'd rather need to consider how to change the jolokiaService so that it can serve hawtio-online as well.

@tadayosi tadayosi added this to the 2023Q4 milestone Sep 26, 2023
@tadayosi
Copy link
Member Author

@phantomjinx Btw, why do we need DummyJolokia here? In hawtio-online, if you cannot create a proper Jolokia instance with the pod, there's something wrong happening and you shouldn't provide a connection to it anyway. I don't see the reason for all the troubles to use DummyJolokia here.
https://github.com/hawtio/hawtio-online/blob/8a4a5f3d78b8b2dbd86a0d5c44268465a80d71cd/packages/management-api/src/managed-pod.ts#L110

@phantomjinx
Copy link
Member

@phantomjinx Btw, why do we need DummyJolokia here? In hawtio-online, if you cannot create a proper Jolokia instance with the pod, there's something wrong happening and you shouldn't provide a connection to it anyway. I don't see the reason for all the troubles to use DummyJolokia here. https://github.com/hawtio/hawtio-online/blob/8a4a5f3d78b8b2dbd86a0d5c44268465a80d71cd/packages/management-api/src/managed-pod.ts#L110

Yes. That's true. It was more to satisfy the Typescript requirements of always returning a jolokia instance of some kind rather than undefined. However, I agree it is an error so perhaps better to throw or something similar in that particular case.

@tadayosi
Copy link
Member Author

I think we can close this issue. For enhancements to jolokiaService , we can discuss each in a separate issue if there need be.

@lhein lhein moved this from New to Done in Kanban Board Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hawtio-online area/shared kind/enhancement Enhancements that don't necessarily result in a new feature
Projects
Archived in project
Development

No branches or pull requests

2 participants