Bug 1309545 - `oc edit` for multiple resources does not edit in one single file
Summary: `oc edit` for multiple resources does not edit in one single file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: David Eads
QA Contact: Wei Sun
URL:
Whiteboard:
: 1347365 (view as bug list)
Depends On:
Blocks: 1389681
TreeView+ depends on / blocked
 
Reported: 2016-02-18 05:16 UTC by Xingxing Xia
Modified: 2020-12-11 12:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1389681 (view as bug list)
Environment:
Last Closed: 2016-12-09 21:51:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xingxing Xia 2016-02-18 05:16:01 UTC
Description:
`oc edit` for multiple resources does not edit in one file. But this worked before.

Version-Release number of selected component (if applicable):
openshift/oc v1.1.3-32-g5ab601a
kubernetes v1.2.0-alpha.7-703-gbc4550d


How reproducible:
Always

Steps to Reproduce:
1. oc login, create a project
2. Create new app
$ oc new-app -f origin/examples/sample-app/application-template-stibuild.jsono
3. Edit multiple resources
1> $ oc edit svc # There are services: frontend and database
2> $ oc edit svc/database dc/database

Actual results:
3.
1> It just edits one resource per file. Press ":wq", it then edits another resource. (This is not convenient. If there are N services and run `oc edit svc`, then need press N times of ":q" to abort edit)
2> Same as 3.1

Expected results:
3. It should edit all resources in one single file as it did in old version of oc.

Additional info:
Seems kubernetes v1.1.0... works well, but kubernetes v1.2.0... works badly.
Here are some other test results:
`oc edit svc/database dc/database` works well when versions are:
oc v1.1-630-gb197d32
kubernetes v1.1.0-origin-1107-g4c8e6f4

Or:
oc v3.1.1.6
kubernetes v1.1.0-origin-1107-g4c8e6f4

Works badly when versions are:
oc v1.1.2-285-gb39b3d8
kubernetes v1.2.0-origin

Or:
oc v3.1.1.902
kubernetes v1.2.0-origin

Comment 1 David Eads 2016-02-18 14:24:27 UTC
Upstream fix: https://github.com/kubernetes/kubernetes/pull/20918

Comment 2 David Eads 2016-02-19 19:24:11 UTC
Per Clayton, the fix won't make this release.  Marking for upcoming.

Comment 3 Michal Fojtik 2016-05-31 12:27:01 UTC
Waiting for the next rebase to pick this up. Since it will probably slip the 3.2.1, we should set it as upcoming release.

Comment 4 Xingxing Xia 2016-06-17 02:01:45 UTC
FYI, there comes a RFE in bug 1347365

Comment 5 Javier Ramirez 2016-06-24 09:45:28 UTC
*** Bug 1347365 has been marked as a duplicate of this bug. ***

Comment 6 Xingxing Xia 2016-07-25 09:05:48 UTC
Checked the PR in comment 1 is merged in latest AMI oc version:
$ oc version
oc v1.3.0-alpha.2+5c862c0
kubernetes v1.3.0+57fb9ac

$ cd github.com/openshift/kubernetes
$ git log --pretty="%h %cd - %s" --date=local 57fb9ac | grep "#20918"
6936b9f Sun May 22 22:12:18 2016 - Merge pull request #20918 from deads2k/fix-list-edit

The issue is fixed. `oc edit` could edit all resources in one single file as it did.
So could move to ON_QA if it is suitable. Thank you.

Comment 7 David Eads 2016-07-25 11:32:34 UTC
Upstream rebased into origin.


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