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

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

Bug Description

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.

[1] https://github.com/openstack/nova/blob/master/nova/tests/unit/notifications/objects/test_notification.py#L267

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

Environment
===========
6a119fc72096fa65678112e151e4a7a00091ce26

Balazs Gibizer (balazs-gibizer) wrote :

The related oslo.versionedobjects bug report: https://bugs.launchpad.net/oslo.versionedobjects/+bug/1595552

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

Waiting for the oslo fix to be merged and released https://review.openstack.org/#/c/333382/

Matt Riedemann (mriedem) wrote :

https://review.openstack.org/#/c/333382/ is in oslo.versionedobjects 1.13.0 now.

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

http://git.openstack.org/cgit/openstack/requirements/tree/global-requirements.txt#n113

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

I proposed the bump in requirements repo https://review.openstack.org/#/c/342704/

Fix proposed to branch: master
Review: https://review.openstack.org/344334

Changed in nova:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/344334
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0ac7c988523f0112ec310deb4acd318cf6009bb8
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 15.0.0.0b2 development milestone.

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

Other bug subscribers