From 73ac14dfaa5b7df9927190b0a5e66de11d5baac5 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 3 Feb 2021 20:37:44 +0200 Subject: [PATCH] Do not drop all wheels with venv_rebuild Removal of venv_build_host_wheel_path leads to all wheels for all services being dropped which results in other role brokeness since we build wheels only when requirements or constraints file is changed. Also we technically don't need to clean it up, since removal of just rest of the files will lead to wheels being rebuild. This change should make usage venv_rebuild safe and not breaking wheels for all services rather then single one. Change-Id: I6bbe66b699ce5ab245bb9779b61b5c4625eba927 Related-Bug: #1914301 (cherry picked from commit 9e7877d55af8088533f623deccfa8f3b48dfc398) --- tasks/python_venv_wheel_build.yml | 1 - tests/test.yml | 28 +++++++--------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/tasks/python_venv_wheel_build.yml b/tasks/python_venv_wheel_build.yml index 051e42d..ffee36b 100644 --- a/tasks/python_venv_wheel_build.yml +++ b/tasks/python_venv_wheel_build.yml @@ -45,7 +45,6 @@ path: "{{ item }}" state: absent with_items: - - "{{ venv_build_host_wheel_path }}" - "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-requirements.txt" - "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-global-constraints.txt" - "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-source-constraints.txt" diff --git a/tests/test.yml b/tests/test.yml index 5a834d5..5565664 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -34,30 +34,16 @@ {%- endif %} {{- _path }} - - name: Install EPEL gpg keys - rpm_key: - key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7" - state: present - when: - - ansible_pkg_mgr in ['yum', 'dnf'] - register: _add_yum_keys - until: _add_yum_keys is success - retries: 5 - delay: 2 - - - name: Install the EPEL repository + - name: Add NGINX repository yum_repository: - name: epel-nginx - baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}" - description: 'Extra Packages for Enterprise Linux 7 - $basearch' - gpgcheck: yes - enabled: yes - state: present - includepkgs: 'nginx*' + name: nginx + description: 'nginx repo' + baseurl: "{{ centos_nginx_mirror | default('http://nginx.org/packages/centos/$releasever/$basearch') }}" + gpgkey: "{{ centos_nginx_key | default('http://nginx.org/keys/nginx_signing.key') }}" when: - ansible_pkg_mgr in ['yum', 'dnf'] - register: install_epel_repo - until: install_epel_repo is success + register: add_nginx_repo + until: add_nginx_repo is success retries: 5 delay: 2