Bug 1388040 - Middleware Provider - Timelines: JS Error and endless load
Summary: Middleware Provider - Timelines: JS Error and endless load
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: Jay Shaughnessy
QA Contact: Hayk Hovsepyan
URL:
Whiteboard:
: 1411827 (view as bug list)
Depends On:
Blocks: 1396238
TreeView+ depends on / blocked
 
Reported: 2016-10-24 09:54 UTC by Hayk Hovsepyan
Modified: 2019-08-06 20:05 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1396238 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:03:55 UTC
Category: ---
Cloudforms Team: Middleware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
deployment.ear (1.09 KB, application/zip)
2016-10-24 09:54 UTC, Hayk Hovsepyan
no flags Details

Description Hayk Hovsepyan 2016-10-24 09:54:50 UTC
Created attachment 1213420 [details]
deployment.ear

Description of problem:
While loading Timelines for Middleware Provider, in cases of failure events, there is a JS Error in console, and page loads endless.

Version-Release number of selected component (if applicable):
5.7.0.6-alpha3.20161019140041_ea8e259
Chrome Version 53.0.2785.116 (64-bit)
FF 49.0

How reproducible:
always when several failure events exists

Steps to Reproduce:
1. Deploy EAR file several times, each time with different runtime namem but the WAR and JAR file inside EAR keep the same. Starting from second deployments it is not successful, as inner WAR and JAR files already exists.
2. Go to Middleware Provider -> Timelines page.
3. Select "Application" Category,do not check " Show Detailed Events ", press Apply. So it should show failure evens.
But in fact page loads endless, JS error is shown in browsers console.
"SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 736 of the JSON data"

Full console log for FF and Chrome are attached.
EAR file is attached.

Comment 4 Jay Shaughnessy 2016-10-24 18:09:14 UTC
There does seem to be an issue displaying deployment failure events in the timeline.  Not sure what happened, it's been working for quite a while, perhaps due to the page redesign.  I'll see if I can find the issue, it may require a UI expert.

Comment 5 Jay Shaughnessy 2016-10-24 21:07:09 UTC
The problem is the message text being supplied from the hawkular server, describing the deployment failre.  This wasn't a problem in the past but perhaps given the new timeline widget there is some new restriction.  The plain text causes a problem as does the text produced by sending it through CGI::escapeHTML.  So, I'm not exactly sure what the issue is.  Perhaps it's too long, I'm not sure.  I'll keep looking but I'm pretty sure the issue is because of the new timeline widget.

Comment 7 Jay Shaughnessy 2016-10-25 13:13:10 UTC
The problem seems to be that the timeline can not handle a message with an embedded newline.  I will verify further but in my test a message like

'line1
line2'

is failing.  If this is the case I will workaround the issue by terminating our event messages at the first newline, but this is likely an issue with the timeline.

Comment 8 Jay Shaughnessy 2016-10-25 15:31:22 UTC
Actually, there is a second issue.  In addition to newlines, double-quotes also can not be ingested.

So, the workaround will be to truncate after the first line, and replace double-quotes with single-quotes.

I will create an issue against the timeline in case MIQ wants to protect against these issues in the widget itself.

Comment 9 Jay Shaughnessy 2016-10-25 16:10:01 UTC
Here is the PR for a fix in the hawkular provider itself.  I will also follow up by creating general timeline issues.

https://github.com/ManageIQ/manageiq/pull/12176

Comment 10 Jay Shaughnessy 2016-10-28 12:23:07 UTC
This is waiting for MIQ merge. I set to POST.

Comment 13 Matt Mahoney 2017-01-17 16:31:05 UTC
*** Bug 1411827 has been marked as a duplicate of this bug. ***

Comment 14 Hayk Hovsepyan 2017-02-09 17:00:46 UTC
Verified on revision 5.8.0.0


Note You need to log in before you can comment on or make changes to this bug.