[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: REST service messages: is severity unique?



The fix for this bug is in pull request


https://github.com/openshift/origin-server/pull/3014

For API versions 1.5 or earlier any messages with severity=result will also have the field set to result.

Note:This is a fix for backward compatibility.  As of version 1.6 (not released yet) the clients should check severity instead of the field attribute for the results from the node.  The field attribute indicates the message is related to a particular attribute of the resource and is used for validation errors.  It should not be used to indicate the type of message.

Lili


----- Original Message -----
From: "André Dietisheim" <adietish redhat com>
To: "Clayton Coleman" <ccoleman redhat com>
Cc: "Daniel McPherson" <dmcphers redhat com>, dev lists openshift redhat com, "Lili Nader" <lnader redhat com>, "Abhishek Gupta" <abhgupta redhat com>
Sent: Friday, July 5, 2013 8:06:06 AM
Subject: Re: REST service messages: is severity unique?

On 07/05/2013 03:59 PM, Clayton Coleman wrote:
> Severities are not unique.

ok, thanks for confirming.

>
> On Jul 5, 2013, at 4:45 AM, André Dietisheim <adietish redhat com 
> <mailto:adietish redhat com>> wrote:
>
>> On 07/05/2013 02:52 AM, Clayton Coleman wrote:
>>> It's definitely a regression to public API behavior.  We worked 
>>> around it in rhc but it would be broken for older versions.
>>>
>>
>> yes sure, I understood this when we discussed it. Nevertheless we 
>> decided to go for a message consumption which would be able to 
>> process the old and new (regression) behaviour since we freeze CR1 
>> this evening and we didnt want to release tooling that was functional 
>> so close to GA.
>>
>> So back to my question, sorry I was printing invalid json 
>> ("undefined") it was not intentional:
>>
>> Is the following possible (3 fields 'null' with 2 identical 
>> severities 'result', in other words are severities unique among 
>> messages of the same field or not)?
>>
>> <snip>
>>
>>   "messages":[
>>       {
>>          "exit_code":0,
>>          "field":null,
>>          "severity":"result",
>>          "text":"Application jekyll was created."
>>       },
>>       {
>>          "exit_code":0,
>>          "field":null,
>>          "severity":"debug",
>>          "text":"The cartridge jenkins deployed a template application"
>>       },
>>       {
>>          "exit_code":0,
>>          "field":null,
>>          "severity":"result",
>>          "text":"Jenkins created successfully.  Please make note of 
>> these credentials:\n   User: admin\n   Password: wLwSzJPh6dqN\nNote:  
>> You can change your password at: 
>> https://jekyll-foobarz.rhcloud.com/me/configure\n";
>>       }
>>    ],
>>
>> </snip>
>>
>>> On Jul 4, 2013, at 8:20 PM, Daniel McPherson <dmcphers redhat com 
>>> <mailto:dmcphers redhat com>> wrote:
>>>
>>>> Adding Abhishek and Lili.
>>>>
>>>> On Jul 4, 2013, at 7:26 PM, Clayton Coleman <ccoleman redhat com 
>>>> <mailto:ccoleman redhat com>> wrote:
>>>>
>>>>> Is the field value a string "undefined" or just null?
>>>>>
>>>>> On Jul 4, 2013, at 7:04 PM, André Dietisheim <adietish redhat com 
>>>>> <mailto:adietish redhat com>> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> I'm currently trying to have the Eclipse tooling for OpenShift 
>>>>>> consuming the old and new json when it comes to messages (no more 
>>>>>> "result" field, "result" now present in severity - 
>>>>>> https://bugzilla.redhat.com/show_bug.cgi?id=980928). We badly 
>>>>>> hope for a hotfix since we're GA in about 1 week.
>>>>>> In the meantime, I'm trying to consume the new and old way at the 
>>>>>> same time (we need to be able to talk to OSE, too, cannot simply 
>>>>>> stick to the new format).
>>>>>> I was thus wondering if severity was unique among messages for 
>>>>>> the same field or is it possible to get several messages with the 
>>>>>> same field and severity?
>>>>>> ex. there are several messages with field "undefined", are the 
>>>>>> also eventually several messages with severity "result"?
>>>>>>
>>>>>> Thanks for your pointers and hints!
>>>>>> Cheers
>>>>>> André
>>>>>> _______________________________________________
>>>>>> dev mailing list
>>>>>> dev lists openshift redhat com 
>>>>>> <mailto:dev lists openshift redhat com>
>>>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]