Bug 1272003 - [devexp_public_692]Inconsistent warning if use letter in completionDeadlineSeconds between create from json file and oc edit
Summary: [devexp_public_692]Inconsistent warning if use letter in completionDeadlineSe...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-15 09:20 UTC by Wenjing Zheng
Modified: 2015-10-23 08:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-23 08:00:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wenjing Zheng 2015-10-15 09:20:24 UTC
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 08:00:39 UTC
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.