Fix setting of upper_constraints fact

The pip_constraint_update filter overrides pip versions from the second
provided list to the first. Update the 'Set upper constraints' task so
that upper-constraints correctly take priority over the local
requirements packages versions.

A test has been included to validate that the role built package
constraints file is correctly applying the upper-constraints from the
openstack requirements repo.

Closes-Bug: 1605846
Change-Id: I53864a34f3ba56a84ed658fa3952aba3c509e0b1
(cherry picked from commit 373978f3c6)
This commit is contained in:
Jimmy McCrory 2016-07-22 23:44:10 -07:00 committed by Jesse Pretorius
parent a3e46632b5
commit 40fec4ad35
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- The ``repo_build`` role now correctly applies OpenStack requirements
upper-constraints when building Python wheels. This resolves
https://bugs.launchpad.net/openstack-ansible/+bug/1605846

View File

@ -49,7 +49,7 @@
- name: Set upper constraints
set_fact:
upper_constraints: "{{ _upper_constraints | pip_constraint_update(local_requirement_normalized) }}"
upper_constraints: "{{ local_requirement_normalized | pip_constraint_update(_upper_constraints) }}"
when: slurp_upper_constraints | success
tags:
- repo-set-constraints