From b1f09bce76e1c273a4bd8ebb766c73df7c6e2073 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Feb 13 2025 12:54:40 +0000 Subject: testing-farm-run-{generic-,}test: Improve error UX Don't make users search around in Zuul output to look for the correct URL to actually find the root cause for the failed test execution. Instead, print it in the message of the failing task, which Zuul will prominently display in various places, expanded by default. Signed-off-by: Clemens Lang --- diff --git a/roles/testing-farm-run-generic-test/tasks/main.yml b/roles/testing-farm-run-generic-test/tasks/main.yml index 7f201c8..58ed9c1 100644 --- a/roles/testing-farm-run-generic-test/tasks/main.yml +++ b/roles/testing-farm-run-generic-test/tasks/main.yml @@ -121,7 +121,10 @@ when: response.json.state == "error" - name: Check the result for failure - fail: msg="Tests have failed" + fail: + msg: |- + Tests have failed + See http://artifacts.dev.testing-farm.io/{{ id.json.id }} for detailed results when: response.json.result.overall == "failed" - debug: msg="Tests have passed" diff --git a/roles/testing-farm-run-test/tasks/main.yml b/roles/testing-farm-run-test/tasks/main.yml index bf97e40..977071d 100644 --- a/roles/testing-farm-run-test/tasks/main.yml +++ b/roles/testing-farm-run-test/tasks/main.yml @@ -101,7 +101,10 @@ when: response.json.state == "complete" and response.json.result.overall == "error" - name: Check the result for failure - fail: msg="Tests have failed" + fail: + msg: |- + Tests have failed + See http://artifacts.dev.testing-farm.io/{{ id.json.id }} for detailed results when: response.json.result.overall == "failed" - name: Check if testing passed @@ -111,5 +114,8 @@ - response.json.result.overall == "passed" - name: Check for unknown state - fail: msg="Testing Farm ended with unknown state" + fail: + msg: |- + Testing Farm ended with unknown state + See http://artifacts.dev.testing-farm.io/{{ id.json.id }} for more information when: not (response.json.state == "complete" and response.json.result.overall == "passed")