Artifacts: filtering by version ignores operators other than equality

Bug #1480393 reported by Alexander Tivelkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Alexander Tivelkov

Bug Description

When the artifacts list is being filtered by the version (i.e. list all the artifacts having the given name and specific range of the version), the API ignores all the comparison operators, i.e. gt:, ge:, le: and lt: prefixed are accepted with the version value, but are ignored and an equality check is executed instead.

Tags: artifacts
Changed in glance:
assignee: nobody → Alexander Tivelkov (ativelkov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: New → In Progress
Changed in glance:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/214185
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8a532a431f8c3695c0cd308cb753f526d0918f9f
Submitter: Jenkins
Branch: master

commit 8a532a431f8c3695c0cd308cb753f526d0918f9f
Author: Alexander Tivelkov <email address hidden>
Date: Tue Aug 18 16:23:20 2015 +0300

    Fixed version unequality artifact filtering

    When filtered by the value of version field artifact list was ignoring
    the filtering operators other then equality. I.e. it was possible to
    list only artifacts having the version equal to some specific value, but
    not the artifacts having the version less then or greater then some
    value.

    To implement the proper filtering a CompositeProperty comparator was
    added which filters the ORM entities in the lexigraphical order of
    version fields: first by version prefix, and then - if prefixes are
    equal - by version suffix.

    Closes-bug: #1480393
    FastTrack

    Change-Id: I67ae323e2b74745d794442d71b020becc494646b

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.0.0
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.