Bug 1475782

Summary: exception on attempt to open report with timelines "Operations VM Power On/Off Events for Last Week"
Product: Red Hat CloudForms Management Engine Reporter: Ievgen Zapolskyi <izapolsk>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED CURRENTRELEASE QA Contact: Ievgen Zapolskyi <izapolsk>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:report:timeline
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1480000 (view as bug list) Environment:
Last Closed: 2018-03-06 15:49:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1480000    
Attachments:
Description Flags
backtrace
none
contents of event_streams table
none
sql inserts for event_streams data none

Description Ievgen Zapolskyi 2017-07-27 10:46:35 UTC
Description of problem:
The report raises exception, when I copy this report and modify its filter to show "This Week" events. 
It seems this happenes because event_streams contains some event which it cannot parse/format.
The same thing happens when i try to download this report any format.

Version-Release number of selected component (if applicable):
5.8.1.5

How reproducible:
100% but it requires same set of events

Steps to Reproduce:
0. Put attached events to event_streams 
1. Go to Cloud Intel->Reports->Reports->All Reports->Events->Operations
2. Choose "Operations VM Power On/Off Events for Last Week" report and make a copy of it
3. Change title and its filter. Filter should be the same except "Management Event: Activity Sample" should be "This Week". But it depends on age of power on/off events in event_streams table for sure.
4. Click Add
5. Go to Cloud Intel->Timelines->Timelines->My Company->Custom
6. Choose just created report

Actual results:
CFME gets broken and shows "unexpected error encountered" view

Expected results:
correct timelines rendering

Comment 2 Ievgen Zapolskyi 2017-07-27 10:58:31 UTC
Created attachment 1305281 [details]
backtrace

Comment 3 Ievgen Zapolskyi 2017-07-27 13:04:41 UTC
Created attachment 1305358 [details]
contents of event_streams table

Comment 4 Ievgen Zapolskyi 2017-07-27 13:09:25 UTC
Created attachment 1305361 [details]
sql inserts for event_streams data

Comment 5 Harpreet Kataria 2017-08-07 09:30:08 UTC
https://github.com/ManageIQ/manageiq-ui-classic/pull/1842

Comment 6 CFME Bot 2017-08-07 14:48:43 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/1acc2e3926b567e4a2cf96e87d18af70d2273510

commit 1acc2e3926b567e4a2cf96e87d18af70d2273510
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Aug 7 05:25:31 2017 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Aug 7 07:44:34 2017 -0400

    Fixed code to only set data/headers column exists in Report col headers.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1475782

 lib/report_formatter/timeline.rb          |  8 +++---
 spec/lib/report_formater/timeline_spec.rb | 44 +++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 4 deletions(-)

Comment 8 Ievgen Zapolskyi 2017-08-21 07:30:20 UTC
*** Bug 1467333 has been marked as a duplicate of this bug. ***

Comment 9 Ievgen Zapolskyi 2017-10-17 12:54:45 UTC
verified in 5.9.0.2.20171010190026_0413a06