UTs "TestMeteringPlugin" failing with new neutron-lib 3.5.0 release

Bug #2016144 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brian Haley
Changed in neutron:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Brian Haley (brian-haley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/neutron/+/880340

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/880341

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/880338
Committed: https://opendev.org/openstack/neutron/commit/c7ef8249419ecbefdc4a604a98d4b23554c78dae
Submitter: "Zuul (22348)"
Branch: master

commit c7ef8249419ecbefdc4a604a98d4b23554c78dae
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Apr 13 17:54:47 2023 +0200

    Do not check the context object in ``TestMeteringPlugin``

    Since [1], the admin context is not ``Context`` object created
    but the new one created in ``ContextBase.elevated``. This method
    copies the object itself (creating a new one), adds the "admin"
    role (if not present) and returns this new object.

    Because this method always returns a new object, it is not possible
    to check the ``Context`` object used to make the function call, as
    long as the test doesn't store the elevated context used in the call
    (apart from the reference stored in the mock object).

    [1]https://review.opendev.org/c/openstack/neutron-lib/+/880143

    Closes-Bug: #2016144
    Change-Id: I5d7eb73606428841caa24ce1e38d1bebd5db0a9b

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/880340
Committed: https://opendev.org/openstack/neutron/commit/6efae0b110af0ea6ee92a9ef774cd702db3b834e
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 6efae0b110af0ea6ee92a9ef774cd702db3b834e
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Apr 13 17:54:47 2023 +0200

    Do not check the context object in ``TestMeteringPlugin``

    Since [1], the admin context is not ``Context`` object created
    but the new one created in ``ContextBase.elevated``. This method
    copies the object itself (creating a new one), adds the "admin"
    role (if not present) and returns this new object.

    Because this method always returns a new object, it is not possible
    to check the ``Context`` object used to make the function call, as
    long as the test doesn't store the elevated context used in the call
    (apart from the reference stored in the mock object).

    [1]https://review.opendev.org/c/openstack/neutron-lib/+/880143

    Closes-Bug: #2016144
    Change-Id: I5d7eb73606428841caa24ce1e38d1bebd5db0a9b
    (cherry picked from commit c7ef8249419ecbefdc4a604a98d4b23554c78dae)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/880341
Committed: https://opendev.org/openstack/neutron/commit/b43c9a6ec053336af8bf6a4b0188cbd4ea2e7cb6
Submitter: "Zuul (22348)"
Branch: stable/zed

commit b43c9a6ec053336af8bf6a4b0188cbd4ea2e7cb6
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Apr 13 17:54:47 2023 +0200

    Do not check the context object in ``TestMeteringPlugin``

    Since [1], the admin context is not ``Context`` object created
    but the new one created in ``ContextBase.elevated``. This method
    copies the object itself (creating a new one), adds the "admin"
    role (if not present) and returns this new object.

    Because this method always returns a new object, it is not possible
    to check the ``Context`` object used to make the function call, as
    long as the test doesn't store the elevated context used in the call
    (apart from the reference stored in the mock object).

    [1]https://review.opendev.org/c/openstack/neutron-lib/+/880143

    Closes-Bug: #2016144
    Change-Id: I5d7eb73606428841caa24ce1e38d1bebd5db0a9b
    (cherry picked from commit c7ef8249419ecbefdc4a604a98d4b23554c78dae)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Brian Haley <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/880309
Reason: Doesn't seem necessary any more, https://review.opendev.org/c/openstack/neutron/+/880338 fixed the issue.

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

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

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

This issue was fixed in the openstack/neutron 22.0.1 release.

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

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