Correction in response code for PUT /v2/cache/{image_id} API

Bug #1971521 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Abhishek Kekane

Bug Description

The newly added cache API ``PUT /v2/cache/{image_id}`` returns http 200 response to user whereas as per the original proposal [1] it should have been http 202.

[1] https://opendev.org/openstack/glance-specs/blame/commit/2638ada23d92f714f54b71db00330e4a6c921beb/specs/xena/approved/glance/cache-api.rst#L153

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/glance/+/840409

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

Reviewed: https://review.opendev.org/c/openstack/glance/+/840409
Committed: https://opendev.org/openstack/glance/commit/ecb040c17786fa28d521a247c556a99442e37d5f
Submitter: "Zuul (22348)"
Branch: master

commit ecb040c17786fa28d521a247c556a99442e37d5f
Author: Abhishek Kekane <email address hidden>
Date: Wed May 4 05:41:56 2022 +0000

    [APIImpact] Correct API response code for PUT /v2/cache/{image_id}

    PUT /v2/cache/{image_id} returns HTTP 200 response code to user but as per
    proposal it should be HTTP 202. This change returns HTTP 202 response to
    user.

    Closes-Bug: #1971521
    Change-Id: I6a875a38bef5beafe352ab3320f3fd199db89aa1

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance/+/841278

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/yoga)

Change abandoned by "Abhishek Kekane <email address hidden>" on branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance/+/841278
Reason: Does not fit in the backport policy!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/glance/+/843028

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/843028
Committed: https://opendev.org/openstack/glance/commit/11989a18f4ede07026a435abb3d695a075ae7004
Submitter: "Zuul (22348)"
Branch: master

commit 11989a18f4ede07026a435abb3d695a075ae7004
Author: Brian Rosmaita <email address hidden>
Date: Mon May 23 16:34:52 2022 -0400

    Bump Image API version to 2.16

    This API version increment is due to change I6a875a38bef5, which
    corrected the response code for the admin-only API call:
        PUT /v2/cache/{image_id}
    The call now returns 202 upon success (it had been returning 200).

    The intent of this version bump is to get the attention of operators
    to take note of this change; from now on, the call always returns 202
    upon success regardless of what API version you request.

    Additionally, cleaned up some version tests that had gotten out of
    date and were not thoroughly testing version negotiation.

    Also, corrected the version negotiation code around the v2.13 API.
    The versions response had been modified by change I6882fd2381e6 to
    only include v2.13 when the 'enabled_backends' config option had a
    value, but the versions negotiation code was not updated to reflect
    that.

    Change-Id: I0cf35ed7e21497826cd581e59aa58774f030b9f6
    Related-bug: #1971521

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (stable/yoga)

Related fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance/+/843208

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

Reviewed: https://review.opendev.org/c/openstack/glance/+/841278
Committed: https://opendev.org/openstack/glance/commit/9043efc5fff4daf83fdbcba1e200ab2e113e0464
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 9043efc5fff4daf83fdbcba1e200ab2e113e0464
Author: Abhishek Kekane <email address hidden>
Date: Wed May 4 05:41:56 2022 +0000

    [APIImpact] Correct API response code for PUT /v2/cache/{image_id}

    PUT /v2/cache/{image_id} returns HTTP 200 response code to user but as per
    proposal it should be HTTP 202. This change returns HTTP 202 response to
    user.

    Closes-Bug: #1971521
    Change-Id: I6a875a38bef5beafe352ab3320f3fd199db89aa1
    (cherry picked from commit ecb040c17786fa28d521a247c556a99442e37d5f)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/glance/+/843208
Committed: https://opendev.org/openstack/glance/commit/55c000ee1d7bb415491071abbc4001b4b715d380
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 55c000ee1d7bb415491071abbc4001b4b715d380
Author: Brian Rosmaita <email address hidden>
Date: Mon May 23 16:34:52 2022 -0400

    Bump Image API version to 2.16

    This API version increment is due to change I6a875a38bef5, which
    corrected the response code for the admin-only API call:
        PUT /v2/cache/{image_id}
    The call now returns 202 upon success (it had been returning 200).

    The intent of this version bump is to get the attention of operators
    to take note of this change; from now on, the call always returns 202
    upon success regardless of what API version you request.

    Additionally, cleaned up some version tests that had gotten out of
    date and were not thoroughly testing version negotiation.

    Also, corrected the version negotiation code around the v2.13 API.
    The versions response had been modified by change I6882fd2381e6 to
    only include v2.13 when the 'enabled_backends' config option had a
    value, but the versions negotiation code was not updated to reflect
    that.

    Change-Id: I0cf35ed7e21497826cd581e59aa58774f030b9f6
    Related-bug: #1971521
    (cherry picked from commit 11989a18f4ede07026a435abb3d695a075ae7004)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 24.1.0

This issue was fixed in the openstack/glance 24.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 25.0.0.0b2

This issue was fixed in the openstack/glance 25.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.