Bug 1615214 - It does alter the object on the server when oc set env -o yaml
Summary: It does alter the object on the server when oc set env -o yaml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.11.0
Assignee: Juan Vallejo
QA Contact: wewang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-13 02:47 UTC by wewang
Modified: 2018-10-11 07:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:24:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:25:04 UTC

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


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