paginate_query warns if sort_keys does not contain 'id'

Bug #1617996 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Ihar Hrachyshka
oslo.db
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

Models do not necessarily have the 'id' attribute. The only reason to warn is when sort_keys would not guarantee stable sorting order. We should inspect the model to determine its unique keys.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

The bug is triggered in Neutron Newton where we now rely on paginate_query to do sorting for versioned objects for models that don't happen to have the 'id' attribute.

Changed in oslo.db:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Added Neutron to the list of affected projects to track requirement bump.

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.db 4.13.1

This issue was fixed in the openstack/oslo.db 4.13.1 release.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

We won't bump the minimal version of oslo.db, at least not for the sake of the bug. Having an oslo.db release is good enough.

Changed in neutron:
status: New → Invalid
Changed in oslo.db:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.db 4.14.0

This issue was fixed in the openstack/oslo.db 4.14.0 release.

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.