Mesa (master): ci: Fix the nick used in IRC reporting.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 6 19:01:29 UTC 2020


Module: Mesa
Branch: master
Commit: 2637961d29b3828e07953159d075f8544ce3fae5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2637961d29b3828e07953159d075f8544ce3fae5

Author: Eric Anholt <eric at anholt.net>
Date:   Tue May  5 12:17:49 2020 -0700

ci: Fix the nick used in IRC reporting.

robclark found that we needed unique IDs when multiple runners were trying
to report flakes at the same time, but it turns out due to nick limits (16
chars on freenode) we were just getting all the runners appended with
"-142" (or whatever the prefix of the pipelines are these days).  And, for
the new flake reporting from baremetal, all the runners ended up being
just "google-freedreno".

Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4896>

---

 .gitlab-ci/bare-metal/fastboot.sh |  1 +
 .gitlab-ci/deqp-runner.sh         | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh
index 801cb9a1407..7b9e6162a07 100755
--- a/.gitlab-ci/bare-metal/fastboot.sh
+++ b/.gitlab-ci/bare-metal/fastboot.sh
@@ -57,6 +57,7 @@ chmod +x rootfs/set-job-env-vars.sh
 for var in \
     CI_COMMIT_BRANCH \
     CI_COMMIT_TITLE \
+    CI_JOB_ID \
     CI_JOB_URL \
     CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
     CI_MERGE_REQUEST_TITLE \
diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index d2e0b592304..0749fc917f3 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -102,7 +102,16 @@ report_flakes() {
         return 0
     fi
     flakes=$1
-    bot="$CI_RUNNER_DESCRIPTION-$CI_PIPELINE_ID"
+    # The nick needs to be something unique so that multiple runners
+    # connecting at the same time don't race for one nick and get blocked.
+    # freenode has a 16-char limit on nicks (9 is the IETF standard, but
+    # various servers extend that).  So, trim off the common prefixes of the
+    # runner name, and append the job ID so that software runners with more
+    # than one concurrent job (think swrast) don't collide.  For freedreno,
+    # that gives us a nick as long as db410c-N-JJJJJJJJ, and it'll be a while
+    # before we make it to 9-digit jobs (we're at 7 so far).
+    runner=`echo $CI_RUNNER_DESCRIPTION | sed 's|mesa-||' | sed 's|google-freedreno-||g'`
+    bot="$runner-$CI_JOB_ID"
     channel="$FLAKES_CHANNEL"
     (
     echo NICK $bot



More information about the mesa-commit mailing list