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

Bug #1595575 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
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

Revision history for this message
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)
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

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

Revision history for this message
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
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b2

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.