The hash of a notification object does not depend on its SCHEMA

Bug #1595575 reported by Balazs Gibizer on 2016-06-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Balazs Gibizer

Bug Description

As oslo ObjectVersionChecker.test_hashes() does not provide a way to supply exta information to the fingerprint generation the current unit test does not detect if the SCHEMA of a versioned notification object has been changed without proper version bump.

Compare the unit test test_versions with test_notification_payload_version_depends_on_the_schema in TestNotificationObjectVersions [1]

The former uses test_hashes without the extra_data_func while the later uses the get_hashes() with extra_data_func.


Steps to reproduce
Modify the SCHEMA of one of the notification object.
Run the unit test
SCHEMA changes are not detected


Balazs Gibizer (balazs-gibizer) wrote :

The related oslo.versionedobjects bug report:

Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
Balazs Gibizer (balazs-gibizer) wrote :

Waiting for the oslo fix to be merged and released

Matt Riedemann (mriedem) wrote : is in oslo.versionedobjects 1.13.0 now.

You'll need to update the minimum required in g-r to rely on it though:

tags: added: notifications
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Balazs Gibizer (balazs-gibizer) wrote :

I proposed the bump in requirements repo

Fix proposed to branch: master

Changed in nova:
status: Confirmed → In Progress

Submitter: Jenkins
Branch: master

commit 0ac7c988523f0112ec310deb4acd318cf6009bb8
Author: Balazs Gibizer <email address hidden>
Date: Tue Jul 19 17:35:36 2016 +0200

    Notification object version test depends on SCHEMA

    As ObjectVersionChecker.test_hashes() supports extra_data_func parameter
    from ovo 2.6.0 this patch makes the notification object version test
    aware of the SCHEMA changes of the notification objects.

    The object hashes are updated without version bump as no real
    changes was made on the objects just the hash calculation is changed.

    Closes-Bug: #1595575
    Change-Id: I1375b43280d29026d7d1c0d362740d6077c5061f

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers