[3.12.0] Extension error (oslo_policy.sphinxpolicygen):

Bug #1970725 reported by Abhishek Kekane
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo.policy
Fix Released
Undecided
Unassigned

Bug Description

Patch [1] causing failure in glance docs job due to the new config option "exclude-deprecated" being a bool

2022-04-28 05:17:00.860334 | ubuntu-focal | Handler <function generate_sample at 0x7f27a0aedb80> for event 'builder-inited' threw an exception (exception: 'bool' object has no attribute 'startswith')

Blacklisting 3.12.0 passing the doc jobs without any issue;

-oslo.policy>=3.8.1 # Apache-2.0
+oslo.policy!=3.12.0,>=3.8.1 # Apache-2.0

[1] https://review.opendev.org/c/openstack/oslo.policy/+/830514

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

Reviewed: https://review.opendev.org/c/openstack/oslo.policy/+/839711
Committed: https://opendev.org/openstack/oslo.policy/commit/9673a74b600cd387aa3d13a6ff923c06c304c55a
Submitter: "Zuul (22348)"
Branch: master

commit 9673a74b600cd387aa3d13a6ff923c06c304c55a
Author: whoami-rajat <email address hidden>
Date: Thu Apr 28 14:38:13 2022 +0530

    Only pass exclude-deprecated when True

    The '--exclude-deprecated' parameter should only be passed to
    oslo.config to parse when it is True.
    The final generated sphinx syntax is[1] where [--exclude-deprecated]
    doesn't require True/False value and only should be passed when True.

    The change introducing this[2] causes parsing issue in oslo.config[3]
    while checking <bool>.startswith (we pass True/False value) and even
    after that while calling argparse[4] with following error[5].

    [1] usage: sphinx-build [-h] [--config-dir DIR] [--config-file PATH] [--exclude-deprecated] [--format FORMAT] [--namespace NAMESPACE]
                            [--noexclude-deprecated] [--output-file OUTPUT_FILE]
    [2] https://review.opendev.org/c/openstack/oslo.policy/+/830514
    [3] https://opendev.org/openstack/oslo.config/src/branch/master/oslo_config/cfg.py#L2937
    [4] https://opendev.org/openstack/oslo.config/src/branch/master/oslo_config/cfg.py#L2960
    [5] > /usr/lib/python3.8/argparse.py(1781)parse_args()
    -> if argv:
    (Pdb)
    > /usr/lib/python3.8/argparse.py(1782)parse_args()
    -> msg = _('unrecognized arguments: %s')
    (Pdb)
    > /usr/lib/python3.8/argparse.py(1783)parse_args()
    -> self.error(msg % ' '.join(argv))
    (Pdb)
    TypeError: sequence item 0: expected str instance, bool found
    > /usr/lib/python3.8/argparse.py(1783)parse_args()
    -> self.error(msg % ' '.join(argv))
    Handler <function generate_sample at 0x7fc0d6697d30> for event 'builder-inited' threw an exception (exception: sequence item 0: expected str instance, bool found)

    Closes-Bug: #1970725
    Change-Id: I95745b8d1cbdb6a7cf442d431a998b7e3ff600e4

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.12.1

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