Bug 1558863 - Cannot create configmap without key on web and "Add Item" on cm editing page does not work
Summary: Cannot create configmap without key on web and "Add Item" on cm editing page ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.9.z
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-21 07:36 UTC by XiaochuanWang
Modified: 2018-05-17 06:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the console would not let you add new keys when editing a config map that was empty. Clicking "Add Item" in the editor would have no effect. The bug has been fix, and you can now correctly add items when editing a config map that has none.
Clone Of:
Environment:
Last Closed: 2018-05-17 06:43:34 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1566 None None None 2018-05-17 06:44:07 UTC

Description XiaochuanWang 2018-03-21 07:36:26 UTC
Description of problem:
oc create configmap with empth key/value needs to keep same with web-console which is not allowed to be saved, otherwise the "Add Item" on configmap editing page does not work.
 
Version-Release number of selected component (if applicable):
oc/openshift v3.9.9
 
How reproducible:
always
 
Steps to Reproduce:
1. $ oc create configmap testconfigmap
configmap "testconfigmap" created
 
2. From web-console, browse to browse/config-maps/testconfigmap, from Actions > Edit page, try to click "Add Item"
 
 
Actual results:
1. configmap is created.
2. The "Add Item" does not work.
 
Expected results:
1. configmap should not be created.
2. The "Add Item" should work.
 
 
Additional info:

Comment 1 Samuel Padgett 2018-03-21 12:52:55 UTC
Caused by:

TypeError: Cannot read property 'push' of undefined
    at ChildScope.$scope.addItem (editConfigMapOrSecret.js:23)
    at fn (eval at compile (angular.js:15126), <anonymous>:4:212)
    at expensiveCheckFn (angular.js:16213)
    at callback (angular.js:26592)
    at ChildScope.$eval (angular.js:17994)
    at ChildScope.$apply (angular.js:18094)
    at HTMLAnchorElement.<anonymous> (angular.js:26597)
    at HTMLAnchorElement.dispatch (jquery.js:5206)
    at HTMLAnchorElement.elemData.handle (jquery.js:5014)

Comment 3 openshift-github-bot 2018-03-21 19:07:55 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/5433d47c78e13142f5899b0d7295c4180ea5a92a
Bug 1558863 - Fix bug editing empty config map

Don't push items onto an undefined config map `data` array.

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

https://github.com/openshift/origin-web-console/commit/74cdd2b4908158c2400c41ef7c57aaf05b7598f9
Merge pull request #2906 from spadgett/empty-config-map-add

Automatic merge from submit-queue.

Bug 1558863 - Fix bug editing empty config map

Don't push items onto an undefined config map `data` array.

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

/assign @benjaminapetersen

Comment 4 Samuel Padgett 2018-03-22 17:26:50 UTC
3.9 fix: https://github.com/openshift/origin-web-console/pull/2909

Comment 6 Yadan Pei 2018-04-17 06:08:01 UTC
Hi Sam

Seems some recent 3.9.z fixes are not bumped into OSE repo correctly, thus some PR could not be verified time after time, could you please check what's going on?

Comment 7 Yadan Pei 2018-04-17 06:25:55 UTC
Changing to MODIFIED to wait the fix lands in

Comment 8 Samuel Padgett 2018-04-17 12:35:06 UTC
This fix should be there. Web console fixes no longer go to the OSE repo since it's a separate image.

Comment 9 Yadan Pei 2018-04-18 01:19:19 UTC
Sorry, I mixed it up with some older version bugs, yes, the fix is already there

Comment 10 Yadan Pei 2018-04-18 01:22:13 UTC
Issue fixed on OpenShift Web Console: v3.9.22 

Could successfully update config map via "Add Item" on edit/config-maps page

Move to VERIFIED

Comment 12 Yadan Pei 2018-04-24 06:12:38 UTC
Move back to VERIFIED since it's mistaken changed by scripts

Comment 15 errata-xmlrpc 2018-05-17 06:43:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1566


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