From 7997aeee7851253c0ff3a573b10a0fa6a877eb3e Mon Sep 17 00:00:00 2001 From: Tony Garcia Date: Thu, 13 Jun 2024 11:51:40 -0500 Subject: [PATCH 1/2] Prefer podman for ansible tests --- .github/workflows/pr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 95f02e51b..22c6363f8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -106,6 +106,9 @@ jobs: - name: Run ansible-test sanity/units run: | set -x + # Prefer using podman over docker + apt-get download podman-docker + sudo dpkg --force-all -i podman-docker*.deb 2>/dev/null EXCLUDE="--exclude hack/" git checkout -b branch git fetch --unshallow origin main From 3c45b3d8c64a63cc02fb9dff005addf162e47bca Mon Sep 17 00:00:00 2001 From: Tony Garcia Date: Thu, 13 Jun 2024 18:37:36 -0500 Subject: [PATCH 2/2] Capture only stderr for sanity and unit tests When merging stdout and stderr we have observed the outputs being mixed and corrupting the output used to compare the incoming branch vs main branch, creating false positives like: ERROR: ... in argument_spec defines type as 'sSee documentation for ... --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 22c6363f8..cc4a6ea60 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -120,12 +120,12 @@ jobs: for version in $PY_VERS; do ansible-test sanity $EXCLUDE --verbose --docker --python $version --color --coverage --failure-ok ansible-test units $EXCLUDE --verbose --docker --python $version --color --coverage || : - done 2>&1 | tee -a branch.output + done 2> >(tee -a branch.output >&2) git checkout main for version in $PY_VERS; do ansible-test sanity $EXCLUDE --verbose --docker --python $version --color --coverage --failure-ok ansible-test units $EXCLUDE --verbose --docker --python $version --color --coverage || : - done >> main.output 2>&1 + done 2> main.output 1>/dev/null for key in branch main; do grep -E "((ERROR|FATAL):|FAILED )" "$key.output" | grep -v "issue(s) which need to be resolved\|See error output above for details.\|Command \"ansible-doc -t module .*\" returned exit status .*\." |