From ab65041a1adf9193e11d3625a7e7c667e78361d1 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 19 Jan 2018 15:08:37 -0800 Subject: [PATCH] Fix whitespace in ara install version checking We have extra whitespace in the pip installed package listing that we don't have in the upstream pypi package search so our string comparison of the versions breaks. Fix this by trimming extra whitespace. Change-Id: I04b28508ff9371397d42957f0d086aa9bb63a4f7 --- manifests/executor.pp | 5 +---- spec/acceptance/fixtures/default.pp | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/manifests/executor.pp b/manifests/executor.pp index 96cbe10..f54d40e 100644 --- a/manifests/executor.pp +++ b/manifests/executor.pp @@ -47,10 +47,7 @@ class zuul::executor ( # that ara's deps don't inadverdently update zuuls deps (specifically # ansible). # - # TODO: This check appears to always fail, causing ara to be - # installed on every puppet run. When this is fixed, update the - # beaker rspec to include zuul::executor. - onlyif => '/bin/bash -c "test \\"$(pip3 list --format columns | sed -ne \'s/^ara\s\+\(.*\)$/\1/p\')\\" != \\"$(pip3 search \'ara$\' | sed -ne \'s/^ara (\(.*\)).*$/\1/p\')\\""', + onlyif => '/bin/bash -c "test \\"$(pip3 list --format columns | sed -ne \'s/^ara\s\+\([.0-9]\+\)\s\+$/\1/p\')\\" != \\"$(pip3 search \'ara$\' | sed -ne \'s/^ara (\(.*\)).*$/\1/p\')\\""', require => Class['::pip::python3'], } diff --git a/spec/acceptance/fixtures/default.pp b/spec/acceptance/fixtures/default.pp index 06abfdd..3054742 100644 --- a/spec/acceptance/fixtures/default.pp +++ b/spec/acceptance/fixtures/default.pp @@ -13,6 +13,7 @@ class { '::zuul::scheduler': } class { '::zuul::merger': } +class { '::zuul::executor': } class { '::zuul::web': } class { '::zuul::fingergw': }