← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1359596] [NEW] Objects should be able to backport related objects automatically

 

Public bug reported:

Following change https://review.openstack.org/#/c/114594 adds checking
for related versions of objects. This is imho wrong because it will make
for unnecessary versioning code that will need to be written by
developers. Better way to do this would be to declare version on the
ObjectField and then do all the necesary backports automatically as the
code is always:

            primitive['field_name'] = (
                    objects.RlatedObject().object_make_compatible(
                        primitive, field_version))

And thus can be done in the superclass in a generic way with a little
bit of tweaking of the ObjectField to know it's expected version, and
stop the proliferation of boilerplate that can be an easy source of
bugs. Furthermore it will stop the unnecessary proliferation of versions
of all related objects. We would need to bump the version of the object
that owns another object only when we require new functionality from the
owned object.

** Affects: nova
     Importance: High
         Status: Confirmed


** Tags: unified-objects

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1359596

Title:
  Objects should be able to backport related objects automatically

Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  Following change https://review.openstack.org/#/c/114594 adds checking
  for related versions of objects. This is imho wrong because it will
  make for unnecessary versioning code that will need to be written by
  developers. Better way to do this would be to declare version on the
  ObjectField and then do all the necesary backports automatically as
  the code is always:

              primitive['field_name'] = (
                      objects.RlatedObject().object_make_compatible(
                          primitive, field_version))

  And thus can be done in the superclass in a generic way with a little
  bit of tweaking of the ObjectField to know it's expected version, and
  stop the proliferation of boilerplate that can be an easy source of
  bugs. Furthermore it will stop the unnecessary proliferation of
  versions of all related objects. We would need to bump the version of
  the object that owns another object only when we require new
  functionality from the owned object.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1359596/+subscriptions


Follow ups

References