Move tempest pip package from a constraint to a requirement

This is necessary to support the new pip resolver.

Depends-On: I9be6bbf4a29a4da2ddf96dc0336bc2a7d8ec9281
Depends-On: I49c75dd11d6c4e8d37fe013b7ffdfd56ff193fcd
Change-Id: If53aca6f16324d305b150466b94d3f18c8a1096a
This commit is contained in:
Jonathan Rosser 2021-01-12 12:06:40 +00:00
parent f1802ede68
commit 1fd23f2aed
2 changed files with 11 additions and 8 deletions

View File

@ -52,7 +52,6 @@ tempest_run: no
tempest_git_install_branch: master
tempest_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
tempest_git_constraints:
- "{{ (tempest_git_repo is defined) | ternary('git+' ~ (tempest_git_repo | default('https://opendev.org/openstack/tempest.git')) ~ '@' ~ tempest_git_install_branch ~ '#egg=tempest', '') }}"
- "--constraint {{ tempest_upper_constraints_url }}"
tempest_pip_install_args: "{{ pip_install_options | default('') }}"
@ -220,7 +219,8 @@ tempest_keystone_interface_insecure: "{{ (keystone_service_internaluri_insecure
tempest_main_group: tempest_all
tempest_pip_packages:
- cmd2<0.9.0 # >=0.9.0 is python3 only
- "{{ (tempest_git_repo is defined) | ternary('git+' ~ (tempest_git_repo | default('https://opendev.org/openstack/tempest.git')) ~ '@' ~ tempest_git_install_branch ~ '#egg=tempest', 'tempest') }}"
- cmd2
- ddt
- junitxml
- lxml
@ -238,7 +238,6 @@ tempest_pip_packages:
- python-saharaclient
- python-subunit
- python-swiftclient
- tempest
- testscenarios
- os-testr
@ -309,10 +308,9 @@ tempest_tempestconf_venv_bin: "/openstack/venvs/tempestconf/bin"
# tempest_tempestconf_git_repo: https://opendev.org/osf/python-tempestconf
tempest_tempestconf_git_install_branch: master
tempest_tempestconf_git_constraints:
- "{{ (tempest_tempestconf_git_repo is defined) | ternary('git+' ~ (tempest_tempestconf_git_repo | default('https://opendev.org/osf/python-tempestconf')) ~ '@' ~ tempest_tempestconf_git_install_branch ~ '#egg=python_tempestconf', '') }}"
- "--constraint {{ tempest_upper_constraints_url }}"
tempest_tempestconf_pip_packages:
- python-tempestconf
- "{{ (tempest_tempestconf_git_repo is defined) | ternary('git+' ~ (tempest_tempestconf_git_repo | default('https://opendev.org/osf/python-tempestconf')) ~ '@' ~ tempest_tempestconf_git_install_branch ~ '#egg=python_tempestconf', 'python_tempestconf') }}"
tempest_tempestconf_profile:
debug: true
create: true

View File

@ -15,8 +15,7 @@
- name: Generate list of tempest plugins installed from source code
set_fact:
tempest_pip_plugins: "{{ tempest_pip_plugins | default([]) + [item.name] }}"
tempest_plugin_constraints: "{{ tempest_plugin_constraints | default([]) + ['git+' ~ item.repo ~ '@' ~ item.branch ~ '#egg=' ~ item.name] }}"
tempest_pip_plugins: "{{ tempest_pip_plugins | default([]) + ['git+' ~ item.repo ~ '@' ~ item.branch ~ '#egg=' ~ item.name] }}"
with_items: "{{ tempest_plugins }}"
when: item.repo is defined
@ -26,12 +25,18 @@
with_items: "{{ tempest_plugins }}"
when: item.package is defined
- name: Retrieve the constraints URL
uri:
url: "{{ tempest_upper_constraints_url }}"
return_content: yes
register: _u_c_contents
- name: Install the python venv
import_role:
name: "python_venv_build"
vars:
venv_python_executable: "{{ tempest_venv_python_executable }}"
venv_build_constraints: "{{ tempest_plugin_constraints + tempest_git_constraints }}"
venv_build_constraints: "{{ (tempest_git_repo is defined) | ternary( _u_c_contents.content.split('\n') | reject('match', '[tempest=*]') | list, tempest_git_constraints) }}"
venv_install_destination_path: "{{ tempest_venv_bin | dirname }}"
venv_pip_install_args: "{{ tempest_pip_install_args }}"
venv_wheel_build_enable: "{{ venv_build_host != inventory_hostname }}"