From 7da79e22a43befdb8318772f1b2ccf773be21329 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 27 Sep 2023 14:59:16 -0700 Subject: [PATCH] Use GDK's .tool-version as canonical settings in build-gdk-image The `build-gdk-image` job attempts to install GitLab with a given GDK version. When the GDK and GitLab `.tool-versions` diverge in PostgreSQL versions, commands such as `psql` will fail to run since the GDK will install one set of PostgreSQL versions while GitLab expects another. To avoid build failures that result from this, use the GDK `.tool-versions` as the canonical file by copying it into the `gitlab` directory since that's what's actually installed. This will help avoid causing broken master builds whenever `.tool-versions` change. Relates to https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/3660 --- qa/gdk/Dockerfile.gdk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/gdk/Dockerfile.gdk b/qa/gdk/Dockerfile.gdk index 74e419623dd3e5..66d5cb947e38c5 100644 --- a/qa/gdk/Dockerfile.gdk +++ b/qa/gdk/Dockerfile.gdk @@ -97,8 +97,9 @@ RUN set -eux; \ (cd gitlab && git init . && git add --all && git commit --quiet -m "Init repository") &> /dev/null; \ gdk config set gitaly.skip_setup true \ && gdk config set workhorse.skip_setup true \ - && gdk config set gitlab_shell.skip_setup true; \ - make redis/redis.conf all \ + && gdk config set gitlab_shell.skip_setup true \ + && cp .tool-versions ./gitlab/ \ + && make redis/redis.conf all \ && gdk kill ENTRYPOINT [ "/home/gdk/entrypoint" ] -- GitLab