object string field filtering on "LIKE" statement lacks initialization

Bug #1724446 reported by Lujin Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Unassigned

Bug Description

In [1], we allow get_objects() to filter LIKE statements, i.e. starts, contains and ends.

However, the parent class lacks necessary initialization of these three attributes.

There is also a trivial bug in [2], the usage of LIKE statement should be "obj_utils.StringContains()", not "obj_utils.StringMatchingContains()".

[1] https://review.openstack.org/#/c/419152/
[2] https://github.com/openstack/neutron/blob/master/doc/source/contributor/internals/objects_usage.rst

Lujin Luo (luo-lujin)
Changed in neutron:
assignee: nobody → Lujin Luo (luo-lujin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: Lujin Luo (luo-lujin) → Ihar Hrachyshka (ihar-hrachyshka)
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Lujin Luo (luo-lujin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/512944
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=28e8265651da2aad1d253f3a47c0e71525dd5e1b
Submitter: Zuul
Branch: master

commit 28e8265651da2aad1d253f3a47c0e71525dd5e1b
Author: Lujin <email address hidden>
Date: Wed Oct 18 15:09:37 2017 +0900

    Add initialization in StringMatchingFilterObj class

    In order to support LIKE statement filter in OVO objects,
    StringMatchingFilterObj class is introduced. However, this class
    does not provide initial attributes of "starts", "contains" and
    "ends".

    In real usage, if these attributes are not initialized, we will
    hit failures in method apply_filters() in db/_model_query.py.

    This patch adds the initialization back.

    Secondly, a typo of "obj_utils.StringMatchingContains" is revised
    in this patch too.

    Change-Id: If828068d8d08ff09dff6c63d53320bc397d32448
    Closes-Bug: #1724446

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.0.0b2

This issue was fixed in the openstack/neutron 12.0.0.0b2 development milestone.

tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/596307

Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Lujin Luo (luo-lujin) → nobody
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/pike)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: stable/pike
Review: https://review.opendev.org/596307
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.