Limit parallelity when installing ansible
There seems to be some race in pip when doing parallel installations of ansible into the different venvs which occasionally breaks tests. This got worse with more supported versions. Thus limit to two workers and see how much this helps. Change-Id: If1cf6fedd68958f4a6c46f50ee51b04b69943f5c
This commit is contained in:
parent
f6863d1af1
commit
1941770f95
|
@ -191,7 +191,11 @@ class AnsibleManager:
|
|||
self.default_version = default_version
|
||||
|
||||
def install(self, upgrade=False):
|
||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||
# Note: With higher number of threads pip seems to have some race
|
||||
# leading to occasional failures during setup of all ansible
|
||||
# environments. Thus we limit the number of workers to reduce the risk
|
||||
# of hitting this race.
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
|
||||
futures = {executor.submit(a.ensure_ansible, upgrade): a
|
||||
for a in self._supported_versions.values()}
|
||||
for future in concurrent.futures.as_completed(futures):
|
||||
|
|
Loading…
Reference in New Issue