Bug 1575488

Summary: Confusing error info for empty key when create configmap
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.10.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: 2018-05-17 13:51:11 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:

Description Yanping Zhang 2018-05-07 05:38:44 UTC
Description of problem:
When create configmap, input name and key, then clear the key value, it prompts confusing error info:
"Duplicate key "". Keys must be unique within the config-map."

Version-Release number of selected component (if applicable):
v3.10.0-0.32.0 

How reproducible:
Always

Steps to Reproduce:
1.On web console create configmap, input key value, then clear the value.
2.
3.

Actual results:
1.Error info shows up:
 Key is required.
Duplicate key "". Keys must be unique within the config-map. 

Expected results:
1.Should not show:
Duplicate key "". Keys must be unique within the config-map. 

Additional info:
Same issue exists when create generic secret.

Comment 2 openshift-github-bot 2018-05-07 13:15:10 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/6f87018a514d7832ed881c0a9dfd92d3fa33a397
Bug 1575488 - Don't show duplicate key error when key is blank

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1575488

https://github.com/openshift/origin-web-console/commit/2b64bd0eae84ee7723529f22226c582d49096a21
Merge pull request #2989 from spadgett/empty-key

Bug 1575488 - Don't show duplicate key error when key is blank

Comment 4 Yanping Zhang 2018-05-16 09:31:45 UTC
OpenShift Master:
    v3.10.0-0.46.0 
Kubernetes Master:
    v1.10.0+b81c8f8 
OpenShift Web Console:
    v3.10.0-0.46.0 
Tested on OCP env with version above, the bug has been fixed, so move it to Verified.