-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Introducing Kafka Streams DevUI #20663
Introducing Kafka Streams DevUI #20663
Conversation
Woot, this is very nice! How complex can a topology be? I wonder if it's going to work well to have both on the same line? But maybe you can tweak things depending on the number of columns? As for pushing the JS dependency to vertx-http, I think it has also some advantages as it would be good to reuse the same JS libraries across all Dev UI components. So I would lean towards keeping it that way. |
/cc @phillip-kruger for his opinion on the color palette. I personally think it looks pretty much OK as it is. |
This looks awesome ! I think we can merge as is and tweek later if needed. You should be able to include the webjar in the runtime module of the extension and still access it from the js, but as @gsmet said, having it in vert-x module makes it easier to reuse, and also only include it when dev mode. |
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.
I added a few comments.
@@ -53,7 +54,7 @@ void build(BuildProducer<FeatureBuildItem> feature, | |||
|
|||
registerClassesThatAreLoadedThroughReflection(reflectiveClasses, launchMode); | |||
registerClassesThatAreAccessedViaJni(jniRuntimeAccessibleClasses); | |||
addSupportForRocksDbLib(nativeLibs, config); | |||
// addSupportForRocksDbLib(nativeLibs, config); |
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.
Hmmm?
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.
My bad... I was having issue to use the 999-SNAPSHOT version and commenting this line was a workaroung.
@@ -0,0 +1,178 @@ | |||
{#include main fluid=true} | |||
{#style} | |||
textarea { |
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.
Better specify a specific style. You never know what we will add later.
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.
Done I use the #topology-description
CSS id to apply the style.
|
||
@Override | ||
public TopologyDescription get() { | ||
Topology topology = Arc.container().instance(Topology.class).get(); |
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.
Are you sure the topology is always produced? What if we just added the extension and haven't configured anything yet? This is a case we need to handle.
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.
You're right. Now I return the Topology
object and test its presence (initially I thought of returning the String version of the topology but was not convenient for upcoming features).
Actually returning the Topology
object makes much more sense.
<label for="topology-description" class="col-form-label h1">Kafka Streams Topology</label> | ||
<textarea id="topology-description" readonly | ||
class="form-control-plaintext p-3 mb-5 bg-white r border rounded" | ||
rows='{info:topology.toString().split("\r\n|\r|\n").length} + 1'> |
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.
What if the topology is not yet defined?
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.
Fixed.
an error Message is displayed
</form> | ||
</div> | ||
<div class="col-5"> | ||
<div id="graph"> |
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.
I would use a more specific id (topology-graph
?).
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.
fixed
912d14a
to
9eea828
Compare
|
||
@Override | ||
public Topology get() { | ||
return Arc.container().instance(Topology.class).get(); |
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.
So you're always producing a topology even if nothing is configured? Because if not, there's a good chance this will fail.
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.
Can you confirm that Arc.container().instance(Topology.class)
will return null I nothing is configured?
I tested by disabling @Produces
on an application.
Do you think it's enough?
Do you see any edge cases?
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.
No it's OK, I thought this method was throwing an exception if not present but it simply returns null. So as long as you have taken into account the null case, we're good.
@gsmet @phillip-kruger I'm thinking of an alternative way to display the absence of the topology. |
@danielpetisme - I like what you have now, I don't think that is an error message, but rather an info message. Nice and clear. |
@gsmet I will let you hit the"Resolve conversation" button wherever it makes sense. |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 9eea828
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 11 #- Failing: integration-tests/vault-agroal
📦 integration-tests/vault-agroal✖
✖
✖
|
Awesome stuff! Can we backport it to |
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.
I spotted a small remaining issue. Once fixed, I think we should merge it.
@@ -32,6 +32,7 @@ | |||
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; | |||
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; | |||
import io.quarkus.deployment.pkg.NativeConfig; | |||
import io.quarkus.kafka.streams.runtime.*; |
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 needs to go away. All the changes in this file are useless.
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.
Done
@gsmet @geoand @phillip-kruger |
9eea828
to
bdf8e26
Compare
I like it |
👍🏼 |
Ok so now I have to dev it 😄 |
I think it's something we will want in |
That looks cool! Please squash everything once done. Thanks! |
bdf8e26
to
76cf3b4
Compare
Hello dream team, I have other ideas in mind regarding Kafka Streams Dev UI, stay tuned ;-) |
Looks great! I marked it for inclusion into Thanks a lot for this! |
76cf3b4
to
ccedcec
Compare
very nice ! |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building ccedcec
|
The CI is failing I'm not sure it's due to the code I introduced... |
Seems like some of of glitch... Mind rebasing on |
ccedcec
to
f8b89c5
Compare
This PR aims at providing a Dev UI for Kafka Streams.
The first element is a topology visualizer similar to https://zz85.github.io/kafka-streams-viz/.
I choose to use mermaid.js rather than a graphviz JS implementation.
The topology is fetched from the Arc container to supply a TopologyDescription object.
Then it's up to the frontend part to parse it, build a mermaid description and render the final graph.
Here you have an example
UI remarks
The main concern I have is regarding mermaid.js files, I had to update the vertx-http extension to bundle the JS files.
I didn't found a way to package static assets as part of the extension itself. I think for isolation/decoupling purposes it would be better to not have to update the vertx-http extension...
https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/DevUI.20custom.20static.20resources/near/256872499
I may add a "statics row on top of the current content displaying the numbers of sub-topologies, input/output topics as well as state stores.
This is the first draft so, feedbacks are more than welcome!