diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-07 16:47:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-07 16:47:58 +0200 |
| commit | d9f3d49c8163ae724440af21ac0d747ea44e92f9 (patch) | |
| tree | 1808982ed8abd55b641341b3f9a39f988d6b5f35 | |
| parent | e7b7362af2163b10d5aa335bdb5e4fe28a4ea5bd (diff) | |
| parent | 8d3360830ccc0d0edb2ed93bb6e59a7a028a9a2d (diff) | |
Rollup merge of #114573 - Kobzol:ci-no-group-on-error, r=oli-obk
CI: do not hide error logs in a group This PR avoids creating a GHA group at the very end of a CI workflow when some failure has happened. Before, when a failure has happened, its GHA group was not closed, however the clock drift check function would create a new group, which would actually close the group containing the error log, thus making errors hidden by default, which is not ideal. See discussion here: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/GHA.20groups.20being.20closed.20on.20failures r? bootstrap
| -rwxr-xr-x | src/ci/run.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ci/run.sh b/src/ci/run.sh index 63239cdc6f2..b8cb758bf40 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -154,13 +154,25 @@ fi # check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure # Pipelines it happened that the certificates were marked as expired. datecheck() { - echo "::group::Clock drift check" + # If an error has happened, we do not want to start a new group, because that will collapse + # a previous group that might have contained the error log. + exit_code=$? + + if [ $exit_code -eq 0 ] + then + echo "::group::Clock drift check" + fi + echo -n " local time: " date echo -n " network time: " curl -fs --head http://ci-caches.rust-lang.org | grep ^Date: \ | sed 's/Date: //g' || true - echo "::endgroup::" + + if [ $exit_code -eq 0 ] + then + echo "::endgroup::" + fi } datecheck trap datecheck EXIT |
