From 03c78725360310437ee455e0b840a2c769da0f39 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 19 Jan 2021 10:25:28 +0000 Subject: [PATCH] Ensure that the rally venv build is self contained Rally ships it's own version of upper-constraints [1]. As we move openstack-ansible to using the new pip resolver this causes several issues. The rally specific version of u-c contains constraints for pip/setuptools/wheel which will inevitably be in conflict with those in global-requirement-pins. This results in several problems. * Rally is branchless and so applying branch-specific versions of openstack u-c is incorrect * Rally should be installed using the rally u-c rather than openstack u-c * Rally should not use the repo server to build wheels as the repo server wheel build venv will have different versions of pip/ setuptools/wheel to those specificed in rally u-c. * Rally venv build should not be subject to openstack-ansible global-requirement-pins as these are in conflict with rally u-c. This patch introduces the changes necessary to build rally in a self contained manner on the utility host with no use of the repo server. It also includes a revert of I73887784cbc3ce6089a42c67871dbc6c3d54acf6. [1] https://opendev.org/openstack/rally-openstack/raw/branch/master/upper-constraints.txt Change-Id: Idbd71ade1ab82d2d218e560b2f10c38116ff47e3 --- defaults/main.yml | 2 +- tasks/main.yml | 3 +++ vars/debian.yml | 3 +++ vars/redhat.yml | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3c253ae..0bea2de 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -46,7 +46,7 @@ rally_database_connection_string: mysql+pymysql://{{ rally_galera_user }}:{{ ral # NOTE(mnaser): This uses the Rally upper-constraints because it # is branchless and maintains it's own constraints, # outside of requirements. -rally_upper_constraints_url: "https://releases.openstack.org/constraints/upper/master" +rally_upper_constraints_url: "https://opendev.org/openstack/rally-openstack/raw/branch/master/upper-constraints.txt" rally_git_constraints: - "--constraint {{ rally_upper_constraints_url }}" rally_pip_packages: diff --git a/tasks/main.yml b/tasks/main.yml index 65834ae..ae4ab90 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -51,10 +51,13 @@ vars: venv_python_executable: "{{ rally_venv_python_executable }}" venv_build_constraints: "{{ rally_git_constraints }}" + venv_build_global_constraints: "{{ [] }}" + venv_build_distro_package_list: "{{ rally_devel_distro_packages }}" venv_install_destination_path: "{{ rally_bin | dirname }}" venv_install_distro_package_list: "{{ rally_distro_packages }}" venv_pip_install_args: "{{ rally_pip_install_args }}" venv_pip_packages: "{{ rally_pip_packages }}" + venv_wheel_build_enable: false venv_facts_when_changed: - section: "rally" option: "venv_tag" diff --git a/vars/debian.yml b/vars/debian.yml index 17d0513..d508a45 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -15,4 +15,7 @@ cache_timeout: 600 +rally_devel_distro_packages: + - libpython3-dev + rally_distro_packages: [] diff --git a/vars/redhat.yml b/vars/redhat.yml index 423b4eb..279d35c 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -13,4 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +rally_devel_distro_packages: + - python36-devel + rally_distro_packages: []