Bug 1810275

Summary: Alertmanager: Prevent duplicate/same router label keys on Receiver forms
Product: OpenShift Container Platform Reporter: David Taylor <dtaylor>
Component: Management ConsoleAssignee: David Taylor <dtaylor>
Status: CLOSED DUPLICATE QA Contact: Yadan Pei <yapei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, jokerman
Target Milestone: ---   
Target Release: 4.4.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-03-04 20:45:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Taylor 2020-03-04 20:36:33 UTC
This bug was initially created as a copy of Bug #1804049

I am copying this bug because: 



Description of problem:
User create Alert receiver with multiple routing label.
When 2 pairs of routing label have same key, it only shows latest one on list page. But if one of them use regular expression, detail page separate them as 2 pairs. If both of them are using/not using regular expression, the first one is replaced by second one.

Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-16-205302

How reproducible:
Always

Steps to Reproduce:
1. User create Alert receiver from alertmanager with multiple routing labels.
User have 2 pairs of routing labels with same key, both are using regular expression (or both are not). Check on list page and Edit form page.
2. User have 2 pairs of routing label with same key, one is using regular expression, the other doesn't. check list and detail page.
3. Create pairs of routing label with different label


Actual results:
1. Both list page and detail page only show the 2nd one, the 1st one is replaced.
2. List page only shows the regular expression pair. Detail page show both, but it reorders the regular expression pair as latest pair.
3. It only display as one pair of label, using comma to separate them.

Expected results:
1&2. Both list and detail page should be consistent. Either labels with same key should be replaced to the latest one no matter using regular expression or not. Or the one using regular expression and the other which not using it should be separated, list page should show as separated one as well.
3. Display for separated labels need to display as 2 individual label. 

Additional info:

Comment 1 David Taylor 2020-03-04 20:45:59 UTC

*** This bug has been marked as a duplicate of bug 1804777 ***