Re: [PATCH 4/4] ci/lib: fix "CI setup" sections with GitLab CI
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Dec 6, 2024, 11:46 UTC
- Message-ID
- <CAOLa=ZTdpmfKfuLj9PcXuO6_EqqR-2V4y8s2mpR3iXAS0sT32A@mail.gmail.com>
- In-Reply-To
- <20241206-pks-ci-section-fixes-v1-4-7ab1b69e3648@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 37 quoted lines
> Whenever we source "ci/lib.sh" we wrap the directives in a separate
> group so that they can easily be collapsed in the web UI. And as we
> source the script multiple times during a single CI run we thus end up
> with the same section name reused multiple times, as well.
>
> This is broken on GitLab CI though, where reusing the same group name is
> not supported. The consequence is that only the last of these sections
> can be collapsed.
>
> Fix this issue by including the name of the sourcing script in the
> group's name.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> ci/lib.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ci/lib.sh b/ci/lib.sh
> index ba8f4da39caf29db5edaffde160bc81a7c58c329..2cdc99e7fd05650ef80715b621b42d15d6b13a12 100755
> --- a/ci/lib.sh
> +++ b/ci/lib.sh
> @@ -55,7 +55,7 @@ group () {
> return $res
> }
>
> -begin_group "CI setup"
> +begin_group "CI setup via $(basename $0)"
>
> # Set 'exit on error' for all CI scripts to let the caller know that
> # something went wrong.
> @@ -393,5 +393,5 @@ esac
>
> MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
>
> -end_group "CI setup"
> +end_group "CI setup via $(basename $0)"
> set -xNice. Before, only the last instance of "CI setup" would be collapsible. Now that should be fixed.
Here are the links for without and with this series.
Without: https://gitlab.com/gitlab-org/git/-/jobs/8565481567#L20 With: https://gitlab.com/gitlab-org/git/-/jobs/8567031049