Red Hat Bugzilla – Bug 1262488
Any syntax error in oc edit command makes all changes to be lost.
Last modified: 2016-09-07 17:06:45 EDT
Description of problem:
While editing any object using oc edit and there is a syntax error, all changes are lost
Version-Release number of selected component (if applicable):
always when you use oc edit
Steps to Reproduce:
1. edit anything using oc edit
2. change something that has a syntax error
3. save the changes
Shows a syntax errors but without the changes made
Shows syntax error with the changes
Fixed in latest.
(In reply to Ricardo Martinelli de Oliveira from comment #0)
> Steps to Reproduce:
> 1. edit anything using oc edit
> 2. change something that has a syntax error
> 3. save the changes
(In reply to Fabiano Franz from comment #2)
> Fixed in latest.
@Ricardo Not sure the detail of "change something"?
@Fabiano Not sure whether "Fixed in latest" means it is fixed in recently latest or it is in fact fixed for long time (and thus not reproduce in latest)?
I have the question, because as far as I tried, the bug is not reproduced when I
test oc v184.108.40.206 and oc v220.127.116.11:
$ versions/v18.104.22.168/oc version
$ oc version
Given resource is created:
$ cat svc_test.yaml
- port: 8080
$ oc create -f svc_test.yaml
service "svc-test" created
oc v22.214.171.124 and oc v126.96.36.199 both act the same as following:
$ versions/v188.8.131.52/oc edit svc svc-test
Change targetPort to quoted "8080" (which is invalid), change .spec.selector.name to frontend. Then press :wq
The editor will prompt: * Invalid value: "8080": must be an IANA_SVC_NAME ...
But the changes are not lost, i.e. the changes 'name: frontend' and 'targetPort: "8080"' are still there.
If my steps to reproduce are not right, please correct me. Otherwise, the bug could close? Thank you!
Not sure if the steps to reproduce depend on server version. In above steps, server version is dev-preview-int, which is v184.108.40.206-1-g64665fc
Not reproducible in latest master, this was likely fixed by the last couple Kubernetes rebases. Bug can be closed, thanks.