oslo.policy 3.0.0 breaks users of the generator tools

Bug #1863637 reported by Ben Nemec
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.policy
Fix Released
Critical
Ben Nemec

Bug Description

As seen in the constraint update for oslo.policy 3.0.0[0], it breaks consumers because it registers a required opt on the global config object that the projects don't recognize. This was caused by the fix for [1].

I think we need to make the namespace arg optional while we migrate consumers to the new method of handling cli args in these tools. We can add an explicit check in oslo.policy to maintain the existing behavior, and once everyone has moved to the new method we can switch back to just making the arg required.

0: https://review.opendev.org/#/c/707716/
1: https://bugs.launchpad.net/oslo.policy/+bug/1849518

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.policy (master)

Fix proposed to branch: master
Review: https://review.opendev.org/708212

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

Reviewed: https://review.opendev.org/708212
Committed: https://git.openstack.org/cgit/openstack/oslo.policy/commit/?id=c3868371212597069e4614d9ae05fe7cd0358ca1
Submitter: Zuul
Branch: master

commit c3868371212597069e4614d9ae05fe7cd0358ca1
Author: Ben Nemec <email address hidden>
Date: Mon Feb 17 16:17:34 2020 +0000

    Temporarily make namespace arg optional

    In order to fix the referenced bug, we need to register cli args on
    the global config object. Unfortunately, that causes issues because
    our consumers are re-calling the conf object in their enforcers due
    to the way we used to handle cli args. Specifically, the conf call
    in the consumer fails because the namespace arg from oslo.policy is
    registered as required, but they don't pass it to the conf call.

    Long-term we want to stop having consumers call the conf object at
    all, but in the meantime we need to provide a migration path that
    doesn't break them. This change registers the namespace arg as
    optional on the conf object and temporarily moves the required check
    to oslo.policy. This will allow us to maintain the existing behavior
    for our cli tools while not breaking consumers who haven't migrated
    to the new cli arg behavior.

    Note that we do have unit test coverage of this behavior[0], so we
    can be reasonably confident the explicit check is maintaining
    compatibility.

    Change-Id: I34ce1dd15c464bec319e51d3e217e26554f1a944
    Closes-Bug: 1863637
    Related-Bug: 1849518
    0: https://github.com/openstack/oslo.policy/blob/6e2fe3857367eb2b3e2d2e92121a408e1ff89ea4/oslo_policy/tests/test_generator.py#L500

Changed in oslo.policy:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.policy 3.0.1

This issue was fixed in the openstack/oslo.policy 3.0.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.