Bug 1277038

Summary: Should not show the resource is updated when using "oc env" to remove non-existing env for the resource
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED EOL QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: aos-bugs, jhadvig, jokerman, maszulik, 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: 2020-02-26 19:12:27 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 Xingxing Xia 2015-11-02 06:58:12 UTC
Description of problem:
If an environment variable is not already existing in the resource, then removing the variable from the resource should not show the resource is updated.

Version-Release number of selected component (if applicable):
openshift/oc v1.0.7-109-g3cf7f3c
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always


Steps to Reproduce:
1. oc login, create project
2. create app
$ oc new-app -f origin/examples/sample-app/application-template-stibuild.json
3. Add env variable and then remove it
$ oc env dc/database ENV1=VAL1
deploymentconfig "database" updated
$ oc deploy database
database #2 deployment running for 9 seconds
database #1 deployed about a minute ago - 1 pod
$ oc env dc/database ENV1-
deploymentconfig "database" updated
$ oc deploy database
database #3 deployment running for 6 seconds
database #2 deployed about  minute ago - 1 pod
4. Just remove an env variable that is not existing
$ oc env dc/database NOTEXIST-
deploymentconfig "database" updated
$ oc deploy database
database #3 deployed 2 minutes ago - 1 pod

Actual results:
4. Show the resource is updated

Expected results:
4. Should not show the resource is updated. Instead, it should give some prompt such as: the env variable does not exist. Otherwise, it gives misleading message.


Additional info: