Bug 1331666

Summary: [userinterface_public_546]Cannot update resource in From File page
Product: OKD Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas, trankin
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:39 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:

Description Xingxing Xia 2016-04-29 07:51:26 UTC
Description of problem:
In From File tab of create page, upload a json file that defines resource already existent in project, then modify something (e.g. metadata.annotations.description) and click 'Create', confirm 'Replace', page shows error:
Not found
Template wasn't found in cache.

But the resource is indeed updated (checkd via CLI.)

Version-Release number of selected component (if applicable):
fork_ami_openshift3_userinterface_public_546_222

How reproducible:
Always

Steps to Reproduce:
1. oc login and create project, create template:
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
2. Prepare resource file with json format in local PC
$ wget https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
3. Login to Openshift web console, click Add to project --> From File --> Browse, select the json file, upload, modify something (e.g. metadata.annotations.description), then click 'Create' and confirm "Replace"

Actual results:
3. Error occurs as said in description. But via `oc get template -o json`, will see the template is indeed updated.

Expected results:
3. Error should not occur. Should prompt success. 

Additional info:

Comment 1 Jakub Hadvig 2016-05-04 07:44:20 UTC
The PR has been merged, please use the master for testing.

Comment 2 Yadan Pei 2016-05-04 08:43:54 UTC
Tested against devenv-rhel7_4087,

1. oc login and create project, create template:
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json

2. Prepare resource file with json format in local PC
$ wget https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json

3. Login to Openshift web console, click Add to project --> From File --> Browse, select the json file, upload, modify something (e.g. Template.metadata.annotations.description), then click 'Create' and confirm "Replace"

Could update Template metadata successfully

Comment 3 Yadan Pei 2016-05-04 08:45:27 UTC
However when change Objects(defined in Template) metadata, these changes can not be updated successfully, will verify this bug and draft another one in order not to be confused

Comment 4 Yadan Pei 2016-05-04 09:42:28 UTC
This bug is subjected to update metadata.annotations.description, so I verified it because description could be updated successfully.

But seems other fields could not be updated successfully, will track with a new bug