Comment 2 for bug 2036986

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-armada-app (f/antelope)

Reviewed: https://review.opendev.org/c/starlingx/openstack-armada-app/+/896129
Committed: https://opendev.org/starlingx/openstack-armada-app/commit/e25852370e71cb5ab2b4df637ff6825c589de923
Submitter: "Zuul (22348)"
Branch: f/antelope

commit e25852370e71cb5ab2b4df637ff6825c589de923
Author: Luan Nunes Utimura <email address hidden>
Date: Thu Sep 21 11:06:10 2023 -0300

    stx-openstackclients: Move patched clients to DIST

    Ever since we migrated to containerized clients, it has been observed
    that two clients -- `cinderclient` and `openstackclient` -- have lost an
    additional parameter that was added by patches [1] and [2]:
    `--location`.

    Apparently, this is happening because the build of this container image
    is prioritizing the download of indexed packages rather than the use of
    the packages we deliver within the wheels tarball (which are patched
    with modifications specific to StarlingX).

    According to [3], when we specify an extra source of wheels for `pip`
    with `--find-links` -- which is what `openstack/loci` does [4] -- it
    does not mean that `pip` will necessarily prioritize this source over
    others, such as PyPi.

    Therefore, to ensure that our patched clients are used in the container
    image, we moved them from `PIP_PACKAGES` to `DIST_PACKAGES` in this
    change.

    Note: The other clients can continue to be installed from indexed
          packages. For this reason, they remain in `PIP_PACKAGES`.

    [1] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-cinderclient/debian/patches/0001-Add-location-parameter-for-volume-backup-creation.patch
    [2] https://opendev.org/starlingx/openstack-armada-app/src/branch/master/upstream/openstack/python-openstackclient/debian/patches/0002-Add-location-parameter-for-volume-backup-creation.patch
    [3] https://github.com/pypa/pip/issues/9959
    [4] https://opendev.org/openstack/loci/src/commit/efccd0a853879ac6af6066eda09792d0d3afe9c0/scripts/pip_install.sh#L7

    Test Plan:
    PASS - Build `stx-openstackclients` container image
    PASS - Run image and confirm that both clients have the --location
           parameter:

           1. docker run -it <user>/stx-openstackclients:<tag> bash
           2. openstack volume backup create -h
           3. cinder help backup-create

    Closes-Bug: 2036986

    Co-Authored-By: Lucas de Ataides <email address hidden>
    Co-Authored-By: Romulo Leite <email address hidden>
    Change-Id: I4eeece7fc4a98b5254ca9367ca85c14ef5df7f3c
    Signed-off-by: Luan Nunes Utimura <email address hidden>