python clients should not have openstackclient as runtime dependency

Bug #1562023 reported by Pavlo Shchelokovskyy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python client for Ironic Inspector
Fix Released
Wishlist
milan k
python-heatclient
Fix Released
Undecided
Kyrylo Romanenko
python-ironicclient
Fix Released
Wishlist
Pavlo Shchelokovskyy
python-muranoclient
Fix Released
Undecided
Oleksii Chuprykov

Bug Description

Currently some python-*client packages list python-openstackclient as their runtime dependency in requirements.txt

This is wrong. In the future we are moving into, python clients should only provide a Python API and expose an OSC plugin for CLI interface. Listing openstackclient as runtime dependency just brings in many in most cases unneeded dependencies like novaclient, neutronclient, cinderclient etc.

If openstackclient is needed for unit/other testing, it should be specified in test-requirements instead.

Changed in python-heatclient:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Changed in python-ironicclient:
assignee: nobody → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

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

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

Changed in python-ironicclient:
assignee: Pavlo Shchelokovskyy (pshchelo) → Kyrylo Romanenko (kromanenko)
Changed in python-heatclient:
assignee: Pavlo Shchelokovskyy (pshchelo) → Kyrylo Romanenko (kromanenko)
Dmitry Tantsur (divius)
Changed in python-ironicclient:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

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

Changed in python-muranoclient:
assignee: nobody → Oleksii Chuprykov (ochuprykov)
status: New → In Progress
Changed in python-muranoclient:
milestone: none → 0.9.0
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

Is there a guideline for these from OSC team?

Revision history for this message
Tang Chen (tangchen) wrote :

Hi guys,

Please refer to: https://github.com/openstack/python-openstackclient/blob/master/doc/source/plugins.rst

This is a doc for OSC plugin users. It says:

OSC must be included in requirements.txt or test-requirements.txt for the plugin project. Update requirements.txt if the plugin project considers the CLI a required feature. Update test-requirements.txt if the plugin project can be installed as a library with the CLI being an optional feature (available when OSC is also installed).

So I think, if your project wants the user to use OSC as a CLI entry point of your commands, you need to add OSC to the requirements.txt.

Thanks.

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

Reviewed: https://review.openstack.org/297731
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=ecd3504c4bc08f5b2028fb7edf9e34b2385e094c
Submitter: Jenkins
Branch: master

commit ecd3504c4bc08f5b2028fb7edf9e34b2385e094c
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Fri Mar 25 17:32:46 2016 +0200

    Move OpenStack client to test-requirements

    OpenStack client is not a runtime dependency of heatclient,
    and having it in requirements just brings in many unneeded dependencies.

    Move it to test-requirements so unit tests for osc plugin work.

    Change-Id: I425b33d5e97e9328fe440f6b190bdd6b6cc813bf
    Closes-Bug: #1562023

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

Reviewed: https://review.openstack.org/299508
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=517feebba5a30972aaa1ba2bd2c077695b03bba8
Submitter: Jenkins
Branch: master

commit 517feebba5a30972aaa1ba2bd2c077695b03bba8
Author: Oleksii Chuprykov <email address hidden>
Date: Wed Mar 30 19:12:19 2016 +0300

    Move OpenStack client to test-requirements

    OpenStack client is not a runtime dependency of muranoclient,
    and having it in requirements just brings in many unneeded dependencies.
    Move it to test-requirements so unit tests for osc plugin work.

    Change-Id: I3365bf8435345a93259aa4320c4507b76836d451
    Closes-Bug: #1562023

Changed in python-muranoclient:
status: In Progress → Fix Released
Changed in python-ironicclient:
assignee: Kyrylo Romanenko (kromanenko) → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-muranoclient 0.9.0

This issue was fixed in the openstack/python-muranoclient 0.9.0 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-heatclient 1.3.0

This issue was fixed in the openstack/python-heatclient 1.3.0 release.

Revision history for this message
Anton Arefiev (aarefiev) wrote :

Fix proposed for python-ironic-inspector-client:
https://review.openstack.org/#/c/453125/

Changed in python-ironic-inspector-client:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → Anton Arefiev (aarefiev)
Changed in python-ironic-inspector-client:
assignee: Anton Arefiev (aarefiev) → milan k (vetrisko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironic-inspector-client (master)

Reviewed: https://review.openstack.org/453125
Committed: https://git.openstack.org/cgit/openstack/python-ironic-inspector-client/commit/?id=1538d5683661d6c490853c734951646a7affa08f
Submitter: Jenkins
Branch: master

commit 1538d5683661d6c490853c734951646a7affa08f
Author: Anton Arefiev <email address hidden>
Date: Tue Apr 4 13:46:02 2017 +0300

    Do not depend on python-openstackclient

    OpenStack client is not a runtime dependency of inspector client,
    and having it in requirements just brings in many dependencies
    which might not be needed at all when using the Python API of the client
    only (for example in server-side applications, like ironic-conductor).

    Although dependency on osc-lib is enough for unit and functional tests
    to pass.

    Also, add a setuptools 'extra' so that users can install openstackclient
    together with inspector client:

        pip install python-ironic-inspector-client[cli]

    Co-Authored-By: Pavlo Shchelokovskyy <email address hidden>
    Closes-Bug: #1562023
    Change-Id: I430549146a25eb05cc7905b221abb81d144e0f8b

Changed in python-ironic-inspector-client:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-ironic-inspector-client 2.0.0

This issue was fixed in the openstack/python-ironic-inspector-client 2.0.0 release.

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

Reviewed: https://review.openstack.org/297730
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=6b1fefe979cd1d45827a10f71ef98957b4bad64d
Submitter: Jenkins
Branch: master

commit 6b1fefe979cd1d45827a10f71ef98957b4bad64d
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Wed Mar 1 17:21:33 2017 +0200

    Do not depend on python-openstackclient

    OpenStack client is not a runtime dependency of ironicclient,
    and having it in requirements just brings in many dependencies
    which might not be needed at all when using the Python API of the client
    only (for example in server-side applications).

    Although dependency on osc-lib is enough for unit tests, add
    python-openstackclient to test-requirements so that functional tests
    pass.

    Also, add a setuptools 'extra' so that users can install
    python-openstackclient together with ironicclient if wishing to do so
    as follows:

        pip install python-ironicclient[cli]

    Change-Id: Ic7d06e61cd234b327613287802361c58bf6bf11e
    Closes-Bug: #1562023

Changed in python-ironicclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-ironicclient 2.0.0

This issue was fixed in the openstack/python-ironicclient 2.0.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.