From 777fe76e6cbc491698d4b4b722948acab2f0a80b Mon Sep 17 00:00:00 2001 From: pacaroha <187338595+pacaroha@users.noreply.github.com> Date: Tue, 5 May 2026 15:13:31 -0700 Subject: [PATCH] gitlab-runner: update skipped tests to fix builds (hopefully fixes flakiness that has kept this from the binary cache sometimes, reduces the scope of some old removals, also fixes builds on Darwin when the sandbox is enabled) --- pkgs/by-name/gi/gitlab-runner/package.nix | 30 ++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/gi/gitlab-runner/package.nix b/pkgs/by-name/gi/gitlab-runner/package.nix index dc94606246a4..da2c49252ccf 100644 --- a/pkgs/by-name/gi/gitlab-runner/package.nix +++ b/pkgs/by-name/gi/gitlab-runner/package.nix @@ -38,26 +38,30 @@ buildGoModule (finalAttrs: { substituteInPlace commands/helpers/file_archiver_test.go \ --replace-fail "func TestCacheArchiverAddingUntrackedFiles" "func OFF_TestCacheArchiverAddingUntrackedFiles" \ --replace-fail "func TestCacheArchiverAddingUntrackedUnicodeFiles" "func OFF_TestCacheArchiverAddingUntrackedUnicodeFiles" - rm shells/abstract_test.go - # No writable developer environment + # Needs `make development_setup` (git repo at tmp/gitlab-test/) rm common/build_settings_test.go rm common/build_test.go rm executors/custom/custom_test.go - # No Docker during build - rm executors/docker/docker_test.go - rm executors/docker/services_test.go - rm executors/docker/terminal_test.go - rm helpers/docker/auth/auth_test.go - - # No Kubernetes during build - rm executors/kubernetes/feature_test.go + # Timing-dependent test causes spurious failures on Hydra. + # Might be fixed upstream in this MR: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/6623 + # Try dropping it on next major version bump + rm executors/kubernetes/internal/watchers/pod_test.go + '' + + lib.optionalString (!stdenv.buildPlatform.isx86_64) '' + # Kubernetes tests actually work fine inside the network sandbox (they don't + # expect real Kubernetes), but they fail on aarch64-linux because their + # mocks expect x86_64 rm executors/kubernetes/kubernetes_test.go rm executors/kubernetes/overwrites_test.go '' + lib.optionalString stdenv.buildPlatform.isDarwin '' - # Invalid bind arguments break Unix socket tests + # Darwin's sandbox blocks sendfile(2) during local HTTP PUT uploads + substituteInPlace commands/helpers/cache_archiver_test.go \ + --replace-fail "func TestUploadExistingArchiveIfNeeded" "func OFF_TestUploadExistingArchiveIfNeeded" + + # Invalid bind arguments break Unix socket tests. substituteInPlace commands/wrapper_test.go \ --replace-fail "func TestRunnerWrapperCommand_createListener" "func OFF_TestRunnerWrapperCommand_createListener" @@ -68,6 +72,10 @@ buildGoModule (finalAttrs: { --replace-fail "func TestClientInvalidSSL" "func OFF_TestClientInvalidSSL" ''; + postPatch = '' + patchShebangs --build helpers/docker/auth/testdata/docker-credential-bin.sh + ''; + excludedPackages = [ # Nested dependency Go module, used with go.mod replace directive #