Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1786043

Summary: Alert Manager Monaco editor show duplicate info
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: David Taylor <dtaylor>
Status: CLOSED NOTABUG QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 4.4CC: aos-bugs, dtaylor, jcaiani, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-28 16:11:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Pods -> Pod Details -> YAML showing duplicate info.
none
hover selection over a block range
none
hover selection for a single line none

Description Yadan Pei 2019-12-23 08:13:04 UTC
Description of problem:
When user make some invalid changes in Alert Manager YAML editor(Monaco editor), hover the invalid string will show duplicate error message

Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2019-12-20-210709

How reproducible:
Always

Steps to Reproduce:
1. Admin user goes to Alert Manager configuration page
steps: Administration -> Cluster Settings -> AlertManager -> click on YAML tab
2. Add a comma , at the end of any line except for the last line, hover the green ~ 

Actual results:
2. At some places, it shows error validation error 3 times

Expected results:
2. show validation error only once

Additional info:

Comment 2 David Taylor 2020-01-08 16:42:17 UTC
Created attachment 1650792 [details]
Pods -> Pod Details -> YAML showing duplicate info.

Pods -> Pod Details -> YAML showing duplicate info.

Comment 3 David Taylor 2020-01-08 16:44:30 UTC
Hi, note this is not unique to Alertmanager YAML editor, I see the same behavior under Pods -> Pod Details -> YAML. Please see attached image.  I believe the Monaco editor might be showing error/info tips for every error it finds in the YAML block(?).

Comment 4 David Taylor 2020-05-11 13:00:55 UTC
We will look into this in the next sprint.

Comment 7 David Taylor 2020-09-28 15:57:00 UTC
Created attachment 1717288 [details]
hover selection over a block range

Comment 8 David Taylor 2020-09-28 15:57:32 UTC
Created attachment 1717289 [details]
hover selection for a single line

Comment 9 David Taylor 2020-09-28 16:11:45 UTC
The latest stying of the YAML Editor clearly shows hover selection range via the semi-transparent light blue highlight/background. When moving the cursor the hover selection switches between single and multiple line 'hover selection'.  When the hover selection range covers a block of yaml it shows all warnings within that range -even if they are duplicates.  This may be giving the appearance of duplicate warnings in the tooltips.

Please see attachment 1717288 [details]

Note moving the cursor over just one character to left, changes the hover position/selection to just encompass a single line.  This limits the warnings to just a single warning.

Please see attachment 1717289 [details]