kaotoio / kaoto-backend Goto Github PK
View Code? Open in Web Editor NEWBackend for the Kaoto project to provide an easy to use integration framework based on Apache Camel.
License: Apache License 2.0
Backend for the Kaoto project to provide an easy to use integration framework based on Apache Camel.
License: Apache License 2.0
This is more a suggestion then an issue.
The camel-kamelets-catalog jar https://search.maven.org/artifact/org.apache.camel.kamelets/camel-kamelets-catalog, already contains the kamelets for the particular version released, so it could be better to use the jar contents instead of parsing from the repository by pointing a tag.
Is your feature request related to a problem? Please describe.
At the moment, we are allowing users to set a name for the integration, but it's not consistent with what's being returned by the API, and that's because in the /viewdefinition endpoint we are not receiving the integration name.
Describe the solution you'd like
A call to /viewdefinition should also return the integration name. It should also use the name that is sent from the UI.
For the response of POST /viewdefinition we don't currently have a required
property, and we probably should.
It would be good if we could support the JSON Schema keywords, particularly for validation:
Instead of using a remote catalog, just read the kamelets from the cluster, if a cluster is available.
Describe the bug
The new /v1/integrations/dsls
endpoint returns an empty array if you send an empty array of steps.
Expected behavior
It should return ALL possible DSLs if the steps array is empty, then we can just use this endpoint for DSLs, and we won't even need the /v1/capabilities
endpoint (at least not for DSLs).
If I first use /v1/capabilities
to populate the list of DSLs, the local DSLs array then gets overridden with an empty array, because the visualization is new with no steps.
Create an operator to easily install both frontend and backend.
The API already supports deployment of integrations:
We need to implement a GET /integrations/$name/log
endpoint that returns a stream of the log of the integration with name $name.
As a first iteration, instead of streaming, we can just return the current log with a parameter $lines returning the last $lines of the log /integrations/$name/log?lines=$lines
.
Implementation Details
The cluster configuration is taken from ~/.kube configuration which can be created with the recommended quick setup for testing.
Recommended quick setup for testing:
kind
https://github.com/kubernetes-sigs/kindcamel-k
https://camel.apache.org/camel-k/installation/platform/kind.htmlThe service that interacts with the cluster is https://github.com/KaotoIO/kaoto-backend/blob/main/cluster/src/main/java/io/kaoto/backend/deployment/ClusterService.java
That service must be called from the resource endpoint https://github.com/KaotoIO/kaoto-backend/blob/main/api/src/main/java/io/kaoto/backend/api/resource/IntegrationResource.java
Currently there isn't much options how to actually monitor the integrations. One of them is use hawtio-online requires jolokia. Jolokia is exposing JConsole jvm attributes as the REST API so that could be handy for kaoto monitoring too.
Create a docker image that contains both frontend and backend so it is easy to test.
Build and push nightly.
Add support for all the EIP listed here:
https://camel.apache.org/camel-k/1.9.x/languages/yaml.html#_supported_eip
This is a low priority enhancement. If you are interested in this feature, please express your interest in the comments.
Describe the solution you'd like
Support translation from Common Workflow Language to Camel.
To do this, implement the StepParserService for Common Workflow Language.
Describe alternatives you've considered
If there is interest, we could also implement the DeploymentGeneratorService to generate CWL source code.
Additional context
This is a generic workflow language created several years ago used by some applications. It could be nice to be interoperable with it.
Change default
property within steps
array (returned from POST
to /viewdefinition
) to be defaultValue
, as default
is a reserved keyword in JS and this could cause some issues.
Is your feature request related to a problem? Please describe.
Syndesis users may want to migrate to Kaoto at some point. But Syndesis JSON format to store integrations is not interoperable.
As a syndesis user, I would like to be able to copy/paste a Syndesis JSON integration in the source code editor and/or upload a zip file so Kaoto understands it and returns the equivalent Camel route (or Kamelet binding).
Describe the solution you'd like
We just need to implement the StepParserService
for Syndesis. Kaoto will return the translated step parsing to whatever output formats it has. To the extend this can be automated, obviously, some Syndesis specific steps may not be translatable.
lalala this is a dummy text
Describe the bug
I am unable to find a sink for Salesforce regardless if using integration or Kamelet/KameletBinding. Regarding the component description at https://camel.apache.org/components/3.18.x/salesforce-component.html there should be both consumer and producer available.
Is your feature request related to a problem? Please describe.
Right now, the catalog endpoint returns all possible steps. If you are trying to add a new step onto an existing step, there is no way to know which steps are possible to connect to it.
Describe the solution you'd like
I would like to be able to call an endpoint that accepts context, maybe via a query param, to return steps that can be connected to the current step.
Describe alternatives you've considered
Creating a custom validation on the frontend, which I will be doing anyway, as a way to filter the existing steps. This wouldn't scale well though.
Additional context
This feature would be to support the Mini Catalog in the frontend (KaotoIO/kaoto-ui#216), which is not available yet.
Once apache/camel-k#3090 is implemented, support it.
Create a Quickstart webpage to help new users test Kaoto.
Depends on #14
Currently integrations are deployed into default namespace by default. Ideally the default could be actual namespace where backend is deployed.
Describe the bug
A clear and concise description of what the bug is.
Stack trace:
Describe the bug
A clear and concise description of what the bug is.
Basic error stack trace:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus$Condition` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.fabric8.kubernetes.client.CustomResourceList["items"]->java.util.ArrayList[0]->io.kaoto.backend.model.deployment.kamelet.Kamelet["status"]->io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus["conditions"]->java.util.ArrayList[0])
at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1904)
at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1349)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1415)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4650)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2831)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3295)
at io.fabric8.kubernetes.internal.KubernetesDeserializer.fromObjectNode(KubernetesDeserializer.java:130)
at io.fabric8.kubernetes.internal.KubernetesDeserializer.deserialize(KubernetesDeserializer.java:94)
at io.fabric8.kubernetes.internal.KubernetesDeserializer.deserialize(KubernetesDeserializer.java:45)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3674)
at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:317)
... 19 more
Using a simple send and receive from slack:
apiVersion: camel.apache.org/v1alpha1
group: camel.apache.org
kind: KameletBinding
metadata:
additionalProperties: {}
finalizers: []
managedFields: []
name: integration
ownerReferences: []
plural: kameletbindings
scope: Namespaced
served: true
singular: kameletbinding
spec:
source:
ref:
apiVersion: camel.apache.org/v1alpha1
name: slack-source
kind: Kamelet
properties:
channel: $HIDDEN
token: $ HIDDEN
sink:
ref:
apiVersion: camel.apache.org/v1alpha1
name: slack-sink
kind: Kamelet
properties:
channel: test
webhookUrl: $HIDDEN
username: kaoto
storage: true
version: v1alpha1
Tried using the kaoto operator at: https://github.com/KonduitAI/kaoto-operator (just changed some ports nothing else)
with the latest camel-k at:
https://github.com/apache/camel-k/releases/download/1.10.0-nightly/camel-k-client-1.10.0-nightly-linux-64bit.tar.gz
I'm guessing this is a jackson incompatibility, a missing annotation or an incompatible property? Maybe missing an @JsonIgnore?
Main issue is here:
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of ```
io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus$Condition` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
Missing creators usually mean there wasn't an empty constructor or an annotation constructor jackson could use to create the relevant object.
Edit: Looking at this on master it appears an empty constructor is already there?
https://github.com/KaotoIO/kaoto-backend/blob/main/kamelet-support/src/main/java/io/kaoto/backend/model/deployment/kamelet/KameletBindingStatus.java#L86
How often do the snapshots get updated? Could this just be me needing to build a newer version?
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project model: Fatal error compiling: error: invalid target release: 14 -> [Help 1]
Either modify minimal version in readme or modify the source/target compiler options (which are specified with different values at different places)
Find and add an appropriate library that provides mutant testing.
Enable mutant testing with a specific profile.
Add a new job that runs the mutation testing (not required for pull requests).
TBD
We need to support eventing.knative.dev
elements:
ref:
kind: Broker
apiVersion: eventing.knative.dev/v1
name: default
properties:
type: example
Right now, as it is not a kamelet, it does not get recognized as a valid step for the graphical side, although it can get deployed.
Describe the solution you'd like
I would like to be able to specify in application.yaml
a file path like this:
repository:
step:
jar:
- "https://repo1.maven.org/maven2/org/apache/camel/kamelets/camel-kamelets/0.6.0/camel-kamelets-0.6.0.jar"
- "https://github.com/KaotoIO/camel-component-metadata/archive/refs/heads/main.zip"
viewdefinition:
git:
-
url: "file://<path to dir>/custom-viewdefinition-catalog"
Describe alternatives you've considered
Using the github repo path.
Additional context
This is convenient for testing and if, for example, you want to experiment with developing your view definition catalog locally.
Add tests to make sure that the remote sources for the catalogs we are loading in applications.yaml
don't fail.
Describe the solution you'd like
Both custom resources and view definitions should be returning the defined integration as a unique identifier that can also be used for creating and fetching deployments.
Kamelet Binding`s offer a mechanism to specify an error policy to adopt in case an event produced by a source or consumed by a sink. Through the definition of an errorHandler you will be able to apply certain logic to the failing event, such as simply logging, ignoring the event or posting the event to a Sink.
We need to support handlers like this one.
Describe the bug
Instead of complete removal, firstly the actual integration pod is Terminating
and then the new (same) integration pod is ContainerCreating
and Running
Expected behavior:
No response
Some steps, like if/else, require branching and merging the flow.
Add a branches
property to steps so we can have branches inside complex steps.
Describe the bug
Kamelets cause a deployment error in the UI, which replaces the YAML and the visualization.
To Reproduce
Steps to reproduce the behavior:
Uploading Kamelet
file:
Kamelet
)2022-05-30 10:31:39,570 WARN [io.kao.bac.api.res.ViewDefinitionResource] (executor-thread-0) Parser class io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService_ClientProxythrew an unexpected error.: java.lang.IllegalArgumentException: Error trying to parse.
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService.deepParse(KameletStepParserService.java:93)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService_Subclass.deepParse$$superforward1(Unknown Source)
[..]
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `io.kaoto.backend.model.deployment.kamelet.KameletTypes` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('(2) out')
at [Source: (StringReader); line: 59, column: 10] (through reference chain: io.kaoto.backend.model.deployment.kamelet.Kamelet["spec"]->io.kaoto.backend.model.deployment.kamelet.KameletSpec["types"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
[..]
2022-05-30 10:31:39,607 ERROR [io.kao.bac.api.res.IntegrationResource] (executor-thread-0) Error processing deployment.: java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:208)
at java.base/java.util.Arrays$ArrayList.<init>(Arrays.java:4137)
at java.base/java.util.Arrays.asList(Arrays.java:4122)
at io.kaoto.backend.api.service.deployment.DeploymentService.crd(DeploymentService.java:38)
Switching from KameletBinding
to Kamelet
:
KameletBinding
)Integration Type
select Kamelet
, press Save.Kamelet
2022-05-30 10:26:31,062 WARN [io.kao.bac.api.res.ViewDefinitionResource] (executor-thread-1) Parser class io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService_ClientProxythrew an unexpected error.: java.lang.StringIndexOutOfBoundsException: Range [0, -1) out of bounds for length 21
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4589)
at java.base/java.lang.String.substring(String.java:2703)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService.processDefinedStep(KameletStepParserService.java:184)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService.processStep(KameletStepParserService.java:126)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService.processSpec(KameletStepParserService.java:107)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService.deepParse(KameletStepParserService.java:91)
at io.kaoto.backend.api.service.step.parser.kamelet.KameletStepParserService_Subclass.deepParse$$superforward1(Unknown Source)
[..]
2022-05-30 10:26:31,110 ERROR [io.kao.bac.api.res.IntegrationResource] (executor-thread-1) Error processing deployment.: java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:208)
at java.base/java.util.Arrays$ArrayList.<init>(Arrays.java:4137)
at java.base/java.util.Arrays.asList(Arrays.java:4122)
at io.kaoto.backend.api.service.deployment.DeploymentService.crd(DeploymentService.java:38)
at io.kaoto.backend.api.service.deployment.DeploymentService_Subclass.crd$$superforward1(Unknown Source)
Expected behavior
Users should be able to change between Kamelets and KameletBindings, and to upload a Kamelet specification.
Logs
If applicable, add logs to help explain your problem.
Environment (please complete the following information):
mvn -version
command: 3.8.5Additional context
Kamelet
used:
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: twitter-search-source
annotations:
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,..." # Truncated (1)
camel.apache.org/provider: "Apache Software Foundation"
labels:
camel.apache.org/kamelet.type: "source"
camel.apache.org/kamelet.group: "Twitter"
spec:
definition:
title: "Twitter Search Source"
description: |-
Allows to get all tweets on particular keywords from Twitter.
It requires tokens that can be obtained by creating an application
in the Twitter developer portal: https://developer.twitter.com/.
required:
- keywords
- apiKey
- apiKeySecret
- accessToken
- accessTokenSecret
properties:
keywords:
title: Keywords
description: The keywords to use in the Twitter search (Supports Twitter standard operators)
type: string
example: "Apache Camel"
apiKey:
title: API Key
description: The API Key from the Twitter application in the developer portal
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
apiKeySecret:
title: API Key Secret
description: The API Key Secret from the Twitter application in the developer portal
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
accessToken:
title: Access Token
description: The Access Token from the Twitter application in the developer portal
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
accessTokenSecret:
title: Access Token Secret
description: The Access Token Secret from the Twitter application in the developer portal
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
types: (2)
out:
mediaType: application/json
flow: (3)
from:
uri: "twitter-search:{{keywords}}"
parameters:
accessToken: "{{accessToken}}"
accessTokenSecret: "{{accessTokenSecret}}"
consumerKey: "{{apiKey}}"
consumerSecret: "{{apiKeySecret}}"
steps:
- marshal:
json: {}
- to: "kamelet:sink"
KameletBinding
used for switching from KameletBinding
to Kamelet
manually:
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: twitter-search-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: twitter-search-source
properties:
keywords: "Apache Camel"
apiKey: "your own"
apiKeySecret: "your own"
accessToken: "your own"
accessTokenSecret: "your own"
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: kafka-sink
properties:
brokers: "The Brokers"
password: "The Password"
topic: "The Topic Names"
username: "The Username"
Right now the deployment endpoint only support KameletBindings. I want to be able to deploy Kamelets too. Potentially... any kind of CRD supported by the backend?
Describe the bug
Log selected from drag and drop as a MIDDLE
step results in YAML where the log
is actually an END
, breaking the visualization.
To Reproduce
Steps to reproduce the behavior:
And I think the problem is because the log that gets generated for the YAML is an END
step for some reason. But maybe when you choose it from the mini catalog it's considered a log of type MIDDLE
?
Expected behavior
A clear and concise description of what you expected to happen.
Logs
It produces this YAML:
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: integration
spec:
source:
ref:
apiVersion: camel.apache.org/v1alpha1
name: chuck-norris-source
kind: Kamelet
steps:
- ref:
apiVersion: camel.apache.org/v1alpha1
name: chunk-template-action
kind: Kamelet
- uri: log:null
sink:
ref:
apiVersion: camel.apache.org/v1alpha1
name: kafka-sink
kind: Kamelet
Investigate using parsers from the Camel-K runtime.
Check:
Add observability to backend calls and deployment.
Is your feature request related to a problem? Please describe.
When I update the integration name in the visualization I am not able to see the changes in the code editor.
Describe the solution you'd like
I would like for the YAML metadata to show the integration/deployment name.
We want the user to be able to interact with the cluster with the following features:
All these leveraged through Camel-K to simplify the implementation.
As a user, I want to be able to call regular camel connectors instead of Kamelets.
Describe the bug
When sending a list of steps to the /customResource
endpoint, if there is no "source" step, then it automatically assumes the first step is a source, which is not always the case. For example, if a user deletes a source step, in the UI we leave a placeholder slot so that they can drag a new source onto it. That's because we are trying to instruct the user that they should always provide a source.
To Reproduce
Steps to reproduce the behavior:
/customResource
where the first step in the array is a middle step, or actionExpected behavior
It should return the steps in the exact same way they were sent, just in the correct format (e.g. YAML, JSON).
relates to KaotoIO/kaoto-ui#231
https://camel.apache.org/components/3.18.x/eips/step-eip.html
Be able to group steps into a meta-step.
A namespace where backend is actually deployed might be useful in cluster environments. It can be exposed as a REST endpoint
Create a new parser that extends StepParserService
in the kamelet-support
module. This class should return the associated Step
s for each camel component.
Is your feature request related to a problem? Please describe.
I need to be able to sort the deployments by date/time, and would like more contextual data I can work with.
Describe the solution you'd like
I would like to see more information for a deployment, like this:
running
currently is a boolean, so if we check on the frontend for this as a status, it means we can only show the user that the deployment is either "running" or "stopped", but if it's failed it will just show as "stopped"date/time
to be able to sort by date/timeerrors
maybe an array of errors or warnings?cluster
and namespace
, maybe version
, or even number of steps
could be interesting? I doubt we could show who deployed it, like the user
but in the future that'd be nice.Describe the solution you'd like
jq is a powerful tool which is beyond just query but also for JSON transformation.
https://stedolan.github.io/jq/
And from Apache Camel 3.18.0 and i.e. from Camel-K 1.10.0, camel-jq will be supported, it then could be used for both Predicate and Expression
https://camel.apache.org/components/next/languages/jq-language.html
It would be a great addition as a transformation tool.
Describe the bug
Sending an empty request to /viewdefinition
, for example if the YAML code editor is empty, results in 500 internal server error with Error processing views definitions: Cannot invoke "java.util.List.size()" because "steps" is null
.
To Reproduce
Steps to reproduce the behavior:
You might actually need to disable this line to see it explode.
Expected behavior
It should return the JSON version, which are empty arrays of steps.
Logs
If applicable, add logs to help explain your problem.
2022-03-09 14:05:48,527 ERROR [io.kao.bac.api.res.ViewDefinitionResource] (executor-thread-10) Error processing views definitions.: java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "steps" is null
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService.passConditional(GenericViewDefinitionParserService.java:93)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService.appliesTo(GenericViewDefinitionParserService.java:74)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass.appliesTo$$superforward1(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass$$function$$1.apply(Unknown Source)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass.appliesTo(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService.parse(GenericViewDefinitionParserService.java:34)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass.parse$$superforward1(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass$$function$$7.apply(Unknown Source)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_Subclass.parse(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.parser.GenericViewDefinitionParserService_ClientProxy.parse(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.ViewDefinitionService.viewsPerStepList(ViewDefinitionService.java:50)
at io.kaoto.backend.api.service.viewdefinition.ViewDefinitionService_Subclass.viewsPerStepList$$superforward1(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.ViewDefinitionService_Subclass$$function$$1.apply(Unknown Source)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.kaoto.backend.api.service.viewdefinition.ViewDefinitionService_Subclass.viewsPerStepList(Unknown Source)
at io.kaoto.backend.api.service.viewdefinition.ViewDefinitionService_ClientProxy.viewsPerStepList(Unknown Source)
at io.kaoto.backend.api.resource.ViewDefinitionResource.views(ViewDefinitionResource.java:102)
at io.kaoto.backend.api.resource.ViewDefinitionResource_Subclass.views$$superforward1(Unknown Source)
at io.kaoto.backend.api.resource.ViewDefinitionResource_Subclass$$function$$1.apply(Unknown Source)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.kaoto.backend.api.resource.ViewDefinitionResource_Subclass.views(Unknown Source)
at io.kaoto.backend.api.resource.ViewDefinitionResource_ClientProxy.views(Unknown Source)
at io.kaoto.backend.api.resource.ViewDefinitionResource$quarkusrestinvoker$views_36b45e7db859aa84479100f14b60a682009b4a7c.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:141)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
Additional context
It probably needs confirmation that it's not a UI problem, but from my side I can't spot anything immediately obvious.
Relates to KaotoIO/kaoto-ui#234.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.