Skip to content

Commit

Permalink
Change pip install task state to 'latest'
Browse files Browse the repository at this point in the history
Currently all pip install tasks only require the package to be
present. This means that when an environment undergoes a minor
upgrade the package is not upgraded to the same version that
was tested with. This ultimately results in a deployed
environment that does not match the tested environment.

While for the services installed into venvs this is not an
issue, it does affect those which do not use venvs and any
packages which are installed outside of a venv or on top
of a venv.

This patch changes the behaviour to ensure that the install
task will always use the latest available package. In
developer_mode this will mean using the version specified
in upper-constraints, and in an integrated build this will
mean the version which is available in the wheel repo's
folder for the tag.

Change-Id: I22821cb24642aad4bface0ae0838351cd0cce257
  • Loading branch information
Jesse Pretorius committed May 4, 2016
1 parent d13c448 commit 5ce4d64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tasks/neutron_install.yml
Expand Up @@ -135,7 +135,7 @@
- name: Install requires pip packages
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options_fact }}"
register: install_packages
until: install_packages|success
Expand Down Expand Up @@ -250,7 +250,7 @@
- name: Install pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options_fact }}"
Expand All @@ -270,7 +270,7 @@
- name: Install pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options_fact }}"
register: install_packages
until: install_packages|success
Expand Down
4 changes: 2 additions & 2 deletions tasks/nuage_neutron_config.yml
Expand Up @@ -15,7 +15,7 @@
- name: Install nuage neutron pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
retries: 5
Expand All @@ -32,7 +32,7 @@
- name: Install nuage neutron pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
retries: 5
delay: 2
with_items:
Expand Down
8 changes: 4 additions & 4 deletions tasks/plumgrid_config.yml
Expand Up @@ -35,7 +35,7 @@
- name: Install plumgrid pip packages (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options|default('') }}"
Expand All @@ -56,7 +56,7 @@
- name: Install plumgrid pip packages fall back (venv)
pip:
name: "{{ item }}"
state: present
state: latest
virtualenv: "{{ neutron_venv_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "--isolated"
Expand All @@ -77,7 +77,7 @@
- name: Install plumgrid pip packages (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "{{ pip_install_options|default('') }}"
register: install_packages
until: install_packages|success
Expand All @@ -96,7 +96,7 @@
- name: Install plumgrid pip packages fall back (no venv)
pip:
name: "{{ item }}"
state: present
state: latest
extra_args: "--isolated"
register: install_packages_fall_back
until: install_packages_fall_back|success
Expand Down

0 comments on commit 5ce4d64

Please sign in to comment.