Comment 5 for bug 1922928

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/glance/+/785420
Committed: https://opendev.org/openstack/glance/commit/78e8b7506a7d68089cf08ba24085bf99e070e4ce
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 78e8b7506a7d68089cf08ba24085bf99e070e4ce
Author: Dan Smith <email address hidden>
Date: Wed Apr 7 08:07:05 2021 -0700

    Fix image/tasks API for in-progress tasks

    A slight error in the tasks_get_by_image() DB API method resulted in
    our excluding in-progress tasks from the returned list. This is
    because those tasks have expires_at=NULL, and we were comparing
    the expires_at>=$NOW to find unexpired tasks. This makes us check for
    "NULL or not expired" instead.

    We did have a test asserting the wrong behavior, but it was done to
    increase coverage and thus was asserting the behavior of the code and
    not the *desired* behavior. This fixes that as well.

    Closes-Bug: #1922928
    Change-Id: I1b6971888673b64ef60bed8fbcc97bbcbcf5c2ac
    (cherry picked from commit 2a0d2303c3346b3e771a40c0fe4d4dceaf16f992)