Bug 1331324

Summary: [userinterface_public_635]configmap still is shown after it is deleted
Product: OKD Reporter: Wei Sun <wsun>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 13:54: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:
Attachments:
Description Flags
configmap none

Description Wei Sun 2016-04-28 10:01:00 UTC
Description of problem:
Create a configmap,and access other resource page,the configmap is shown.And then delete the configmap on web console,there is prompt "Config map 'game-config' was marked for deletion" ,but the configmap is shown on web console.
Click config map list again,the configmap is still shown on web console.
Refresh the page and click config map again,get the error in the console log:
vendor.js:5310 TypeError: Cannot read property 'by' of undefined
    at Object.<anonymous> (scripts.js:3402)
    at k (vendor.js:1749)
    at Object.l.fireWith (vendor.js:1791)
    at Object.l.fire (vendor.js:1794)
    at l._listOpComplete (scripts.js:1068)
    at scripts.js:1050
    at vendor.js:4879
    at i (vendor.js:5556)
    at vendor.js:5564
    at l.$eval (vendor.js:5844)


Version-Release number of selected component (if applicable):
devenv-fedora_4053
$ openshift version
openshift v1.3.0-alpha.0-167-g4589987
kubernetes v1.3.0-alpha.1-331-g0522e63
etcd 2.3.0


How reproducible:
Always

Steps to Reproduce:
1.Create a configmap
$ cat configmap-test 
#!/bin/bash

mkdir configmap-test
cat <<EOF > configmap-test/game.properties
enemies=aliens
lives=3
enemies.cheat=true
enemies.cheat.level=noGoodRotten
secret.code.passphrase=UUDDLRLRBABAS
secret.code.allowed=true
secret.code.lives=30
EOF

cat <<EOF > configmap-test/ui.properties
color.good=purple
color.bad=yellow
allow.textmode=true
how.nice.to.look=fairlyNice
EOF

oc create configmap game-config --from-file=configmap-test
2.Access other resource page to show configmap
3.Delete the config map on web console


Actual results:
3.configmap still is shown after it is deleted

Expected results:
3.Should not show the configmap

Additional info:

Comment 1 Wei Sun 2016-04-28 10:01:33 UTC
Created attachment 1151793 [details]
configmap

Comment 2 Jessica Forrester 2016-04-28 12:33:26 UTC
The issues are caused by a bug in the API with config maps not returning an empty array when there are none (returns nil instead).  But going to put a stopgap in place so we dont break if other third party resources (incorrectly) do the same thing.

Comment 3 Wei Sun 2016-05-03 07:08:15 UTC
Verified this bug against devenv-rhel7_4078.
Now configmap is not shown after it is deleted.