[openstack-dev] [nova] gate "gate-nova-python27-db" is broken due to oslo.context 2.6.0

Hayes, Graham graham.hayes at hpe.com
Tue Jul 19 09:06:52 UTC 2016


On 18/07/16 22:27, Ronald Bradford wrote:
> Hi All,
>
> For Oslo libraries we ensure that API's are backward compatible for 1+ releases.
> When an Oslo API adds a new class attribute (as in this example of
> is_admin_project and 4 other attributes) added to Oslo Context in
> 2.6.0,  these are added to ensure this API is also forward compatible
> with existing project code for any contract with the base class
> instantiation or manipulation.

Which projects is this run against?

> The issue seen is presently Nova specific (as other projects can
> utilize 2.6.0) and it is related to projects that sub-class
> oslo.context, and how unit tests are written for using class
> parameters.  Ideally, to implement using oslo.context correctly
> OpenStack projects should:

Designate also had to make a quick change to support 2.6.0.

We were lucky as it was noticed by the RDO builds, which had pulled in
2.6.0 before the requirements update was proposed, so it did not break
our gate.

I just did a quick search and there is a few projects that hardcoded
this, like we did.

> * Not perform direct dictionary to dictionary comparisons with the
> to_dict() method as this does not support when new attributes at
> added. Two patches (one to nova) address this in offending projects
> [5][6]
> * Unit tests should focus on attributes specific to the sub-classed
> signature, e.g. [7].  Oslo context provides an extensive set of unit
> tests for base class functionality. This is a wish list item for
> projects to implement.
>
> The to_dict() method exists as a convenience method only and is not an
> API contract. The resulting set of keys should be used accordingly.
> This is why there is no major release version.

How are developers supposed to know that?

This kind of feels like semantics. This was an external API that changed
and as a result should have been a major version.

> There is a note from our discussion in Oslo to improve our
> documentation to describe the API use of to_dict() better and state we
> will not remove to_dict() keys within a release, but that may happen
> between releases.
>
> There is a subsequent problem with how Nova performs a warning test
> [8]. Additional reviews are looking at addressing this sub-class usage
> of from_dict() and to_dict().
>
> Regards
>
> Ronald
>
>
> [5] https://review.openstack.org/#/c/343694/,
> [6] https://review.openstack.org/#/c/342367/
> [7] https://review.openstack.org/#/c/342869/
> [8] http://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/test_context.py#n144
>
> On Mon, Jul 18, 2016 at 10:50 AM, Matt Riedemann
> <mriedem at linux.vnet.ibm.com> wrote:
>> On 7/18/2016 9:42 AM, Matt Riedemann wrote:
>>>
>>> On 7/18/2016 9:09 AM, Markus Zoeller wrote:
>>>>
>>>> Since yesterday, Nova uses "oslo.context" 2.6.0 [1] but the needed
>>>> change [2] is not yet in place, which broke "gate-nova-python27-db"[3].
>>>> Logstash counts 70 hits/h [4]. Most folks will be at the midcycle in
>>>> Portland and won't be available for the next 2h or so.
>>>> If you can have a look at it and merge it, that would be great.
>>>>
>>>> References:
>>>> [1]
>>>>
>>>> https://github.com/openstack/requirements/commit/238389c4ee1bd3cc9be4931dd2639aea2dae70f1
>>>>
>>>> [2] https://review.openstack.org/#/c/342604/1
>>>> [3] https://bugs.launchpad.net/nova/+bug/1603979
>>>> [4] logstash: http://goo.gl/79yFb9
>>>>
>>>
>>> This is an API change for oslo.context, why wasn't it released as 3.0.0?
>>>
>>> Seems we should revert the upper-constraints bump and blacklist 2.6.0,
>>> then get that released as 3.0.0.
>>>
>>
>> Here is the blacklist:
>>
>> https://review.openstack.org/#/c/343683/
>>
>>
>> --
>>
>> Thanks,
>>
>> Matt Riedemann
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>




More information about the OpenStack-dev mailing list