positional args not being parsed in the order specified in schema

Bug #1392428 reported by Hemanth Makkapati
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
High
Mike Fedosin

Bug Description

It appears that positional args are being parsed in alphabetical order instead of the order they appear in the schema.

A way to reproduce and a relevant converstaion in #openstack-oslo can be found at https://gist.github.com/hmakkapati/cb10bde18a74131c7cb4

Louis Taylor (kragniz)
Changed in oslo.config:
status: New → Confirmed
Louis Taylor (kragniz)
Changed in oslo.config:
assignee: nobody → Louis Taylor (kragniz)
Revision history for this message
Mike Fedosin (mfedosin) wrote :

I've found that the problem in https://github.com/openstack/oslo.config/blob/master/oslo/config/cfg.py#L1805
Need to check if incoming opt is positional and then process it first.

Mike Fedosin (mfedosin)
Changed in oslo.config:
assignee: Louis Taylor (kragniz) → Mike Fedosin (mfedosin)
Louis Taylor (kragniz)
Changed in oslo.config:
assignee: Mike Fedosin (mfedosin) → nobody
Mike Fedosin (mfedosin)
Changed in oslo.config:
assignee: nobody → Mike Fedosin (mfedosin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/135150

Changed in oslo.config:
status: Confirmed → In Progress
Changed in oslo.config:
milestone: none → next-kilo
importance: Undecided → High
Changed in oslo.config:
milestone: 1.5.0 → next-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/135150
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=e447675ef8a24665bfe3e5c22389f1c73b79923f
Submitter: Jenkins
Branch: master

commit e447675ef8a24665bfe3e5c22389f1c73b79923f
Author: Mike Fedosin <email address hidden>
Date: Tue Nov 18 05:14:32 2014 +0300

    Fix wrong order of positional args in cli

    Positional arguments were incorrectly parsed because instead of
    original order there was an alphabetical.

    This patch brings a positional field in Opt class and then sorts
    all arguments by position-name.

    Change-Id: Ia22654442b895c3f62834428f0ec6c3e8af22ebb
    Closes-Bug: 1392428

Changed in oslo.config:
status: In Progress → Fix Committed
Changed in oslo.config:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 6.0.0.0b1

This issue was fixed in the openstack/tripleo-heat-templates 6.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 5.2.0

This issue was fixed in the openstack/tripleo-heat-templates 5.2.0 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.