Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1615214

Summary: It does alter the object on the server when oc set env -o yaml
Product: OpenShift Container Platform Reporter: wewang <wewang>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: low Docs Contact:
Priority: low    
Version: 3.11.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---Keywords: Regression
Target Release: 3.11.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-10-11 07:24:38 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 wewang 2018-08-13 02:47:38 UTC
Description of problem:
`oc set env -h` says:
  # Output modified build config in YAML, and does not alter the object on the server
  oc set env bc/sample-build STORAGE_DIR=/data -o yaml
But it does alter!

cli
l/l

Version-Release number of selected component (if applicable):
oc v3.11.0-0.11.0

How reproducible:
always

Steps to Reproduce:
1.Create app 
$oc new-app https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/tc470422/application-template-stibuild.json 

2.Output modified build config in YAML
$oc set env bc/ruby-sample-build -e STORAGE_DIR\=/data -o yaml

3.Check the bc 
$oc set env bc/ruby-sample-build --list=true
    # buildconfigs/ruby-sample-build
      EXAMPLE=sample-app
      FOO=foo
      STORAGE_DIR=/data

Actual results:
The env(STORAGE_DIR=/data) is in bc 

Expected results:
The env(STORAGE_DIR=/data) should not be in bc 

Additional info:
fyi, if oc set env bc/ruby-sample-build STORAGE_DIR=/data -o yaml --dry-run=true 
will not set env in bc

Comment 1 Juan Vallejo 2018-08-13 18:54:33 UTC
Origin PR: https://github.com/openshift/origin/pull/20625

Comment 2 Juan Vallejo 2018-08-16 23:01:40 UTC
Origin PR has merged. Moving to MODIFIED

Comment 4 wewang 2018-09-07 02:37:29 UTC
verified in oc v3.11.0-0.25.0

Comment 6 errata-xmlrpc 2018-10-11 07:24:38 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:2652