Bug 1272003 - [devexp_public_692]Inconsistent warning if use letter in completionDeadlineSeconds between create from json file and oc edit
[devexp_public_692]Inconsistent warning if use letter in completionDeadlineSe...
Status: CLOSED NOTABUG
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Maciej Szulik
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-15 05:20 EDT by Wenjing Zheng
Modified: 2015-10-23 04:00 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-23 04:00:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2015-10-15 05:20:24 EDT
Description of problem:
If edit completionDeadlineSeconds to letter like abc in buildconfig to save,below warning will appear:The edited file had a syntax error: unable to load "edited-file": json: cannot unmarshal string into Go value of type int64

But if set it to letter in json file, then create it with oc create or oc new-app, below waring appears which is not clear like above one:
error: invalid character 'a' looking for beginning of value

Version-Release number of selected component (if applicable):
openshift v1.0.6-610-g1bc373b
kubernetes v1.1.0-alpha.1-653-g86b4e77

How reproducible:
always

Steps to Reproduce:
1. wget https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/sourcebuildconfig.json and change completionDeadlineSeconds to abc
2, Create with this file via oc create
3. Check the warning

Actual results:
Unclear warning appears.

Expected results:
It should be like unable to load "edited-file": json: cannot unmarshal string into Go value of type int64

Additional info:
Comment 1 Maciej Szulik 2015-10-23 04:00:39 EDT
The reason for that is when invoking oc edit you're actually editing yaml file which has slightly different syntax than json. Specifically there a difference how you specify strings vs numbers. The latter is defined in json without " (double quotes). That's why the error is different in both cases. When changing number to letters in json without adding double quotes you'll get validation error as this file is not valid json at all, but if you add double quotes around letter you'll get exactly the same warning as you have when doing oc edit.

Having said that, I'm closing this as not a bug.

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