syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

DataMapper UI stuck if there is problem in metadata #562

Closed jludvice closed 7 years ago

jludvice commented 7 years ago

I'm unable to load data mapper ui on syndesis-qe instance.

Steps to reproduce:

screenshot_20170529_171253

I see only this log entry in data mapper pod:

2017-05-29 15:12:07.650  WARN 1 --- [ XNIO-3 task-32] c.m.a.j.i.v2.ClassInspectionService      : VarArg, Bridge, Synthetic or Default method compareTo detected
jludvice commented 7 years ago

So far I found one difference - when setting up salesforce / upsert on ipaas-staging, I have to fill also this form screenshot_20170529_171927 which is not present in syndesis-qe CC @dsimansk

jludvice commented 7 years ago

Hi @gashcrumb, do you have idea what might go wrong?

gashcrumb commented 7 years ago

Not entirely sure, kinda seems like a class not found error possibly? If you look in the network tab and look at the actual response back from the mapping backend that usually provides a little more information.

jludvice commented 7 years ago

Ok, next try, I tried to use one existing integration and after clicking on "Data Mapper" step there was no request sent to backend, just this error in browser console:


vendor.1ccaf9c….bundle.js:148 ERROR TypeError: Cannot read property 'kind' of undefined
    at l.createDocumentDefinition (0.ed8ca6e….chunk.js:1)
    at l.initialize (0.ed8ca6e….chunk.js:1)
    at 0.ed8ca6e….chunk.js:1
    at t.invokeTask (polyfills.7396005….bundle.js:36)
    at Object.onInvokeTask (vendor.1ccaf9c….bundle.js:316)
    at t.invokeTask (polyfills.7396005….bundle.js:36)
    at n.runTask (polyfills.7396005….bundle.js:36)
    at invoke (polyfills.7396005….bundle.js:36)
    at e (polyfills.7396005….bundle.js:15)
```
jludvice commented 7 years ago

Another try, create new integration from twitter/mention to salesforce/upsert and add datamapper step

Related http requests (in order of appearence):

request https://syndesis-qe.b6ff.rh-idev.openshiftapps.com/api/v1/integration-support/generate/pom.xml response pom.xml.txt

request https://syndesis-qe.b6ff.rh-idev.openshiftapps.com/v2/atlas/java/mavenclasspath response

{
    "MavenClasspathResponse": {
        "classpath": "",
        "executionTime": 0,
        "jsonType": "com.mediadriver.atlas.java.v2.MavenClasspathResponse"
    }
}

request https://syndesis-qe.b6ff.rh-idev.openshiftapps.com/v2/atlas/java/class response: class-1.txt

request: https://syndesis-qe.b6ff.rh-idev.openshiftapps.com/v2/atlas/java/class response: class-2.txt

One more thing - while I'm watching the Loading source/target documents. spinner, my chrome constantly consumes more and more RAM and ~6% CPU time. It seems like there is some never-ending computation going on.

gashcrumb commented 7 years ago

I suspect the second response is probably what causes the data mapper UI component to not load, in general I think it's a condition that's not catered for very well yet.

jludvice commented 7 years ago

this issue is still present on syndesis-qe instance

jludvice commented 7 years ago

@gashcrumb datamapper ui started to load when I updated "ipaas snapshot" with more recent content snapshot

but I still consider this an issue -> datamapper should report "I can't load because component XY has broken metadata..." not hang on rotating spinner

gashcrumb commented 7 years ago

@jbakermd wonder, I think you've improved the error handling lately in the data mapper component for this kind of behavior, am I right there?

jbakermd commented 7 years ago

Error handling is improved in the latest version that'll be integrated soon (#602). When I was working on the integration I saw a similar example of the data mapper load screen hanging forever. After integrating the latest version these errors were shown on the screen with enough detail for the user to discern the problem.

The error I encountered was irrelevant to this discussion probably. It was an error that one of our test classes (salesforce contact) did not exist - which was caused by my local version of the services not having that particular test class from the summit demo in our classpath.

jbakermd commented 7 years ago

Note about @jludvice's earlier comment about this error in the console:

vendor.1ccaf9c….bundle.js:148 ERROR TypeError: Cannot read property 'kind' of undefined at l.createDocumentDefinition (0.ed8ca6e….chunk.js:1) at l.initialize (0.ed8ca6e….chunk.js:1)

That's most likely this line here:

https://github.com/syndesisio/syndesis-ui/blob/master/src/app/integrations/edit-page/step-configure/data-mapper-host.component.ts#L112

switch (dataShape.kind) {

The type of dataShape in this instance is DataShape, which appears to be used within syndesis to pass source/target metadata to the data mapper's initialization routine.

Sounds like in that specific run, the source/target metadata was null.

Perhaps this will help with that particular error seen a few months back.

gashcrumb commented 7 years ago

Good point. Not sure which existing integration that was, but some of the ones in the database are stale and may not have all of the correct attributes. Definitely needs to be an error that's handled properly by the controller I have there that initializes the data mapper.

jludvice commented 7 years ago

Do we plan to fix this issue any time soon ? Screen recording of timer >> http integration where datamapper freezes on loading spinner

https://youtu.be/PgT-LNSe9ek

gashcrumb commented 7 years ago

Yeah, neither timer or http even have types to map, so the plan is not to show the data mapper if it's not applicable to the integration.

gashcrumb commented 7 years ago

This relates to https://github.com/syndesisio/syndesis-ux/issues/25 BTW