about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2022-02-06 17:19:59 +0100
committerVladimír Čunát <v@cunat.cz>2022-02-06 17:19:59 +0100
commitf0f251d90ac16afe988c8fd02c12739162d1d75a (patch)
tree55d6de171349813460ae35e8f2f8ce72ed0559ce /pkgs/development
parentdb4a9fb8cd9b318dc76da5bfa3a32f288fce3fea (diff)
parent7c2319905daf9e9142ad68585d3c10dc8c4d5069 (diff)
Merge #157109: github-runner: 2.286.0 -> 2.287.1
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/continuous-integration/github-runner/default.nix51
-rw-r--r--pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch25
2 files changed, 30 insertions, 46 deletions
diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix
index 1b95903c6013f..67433ab5d88a0 100644
--- a/pkgs/development/tools/continuous-integration/github-runner/default.nix
+++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix
@@ -43,13 +43,13 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "github-runner";
-  version = "2.286.0";
+  version = "2.287.1";
 
   src = fetchFromGitHub {
     owner = "actions";
     repo = "runner";
     rev = "v${version}";
-    hash = "sha256-a3Kh65NTpVlKUer59rna7NWIQSxh1edU9MwguakzydI=";
+    hash = "sha256-4SPrtX3j8blWTYnSkD2Z7IecZvI4xdAqHRJ1lBM0aAo=";
   };
 
   nativeBuildInputs = [
@@ -77,9 +77,6 @@ stdenv.mkDerivation rec {
     ./patches/use-get-directory-for-diag.patch
     # Don't try to install systemd service
     ./patches/dont-install-systemd-service.patch
-    # Prevent the runner from starting a self-update for new versions
-    # (upstream issue: https://github.com/actions/runner/issues/485)
-    ./patches/prevent-self-update.patch
   ];
 
   postPatch = ''
@@ -90,7 +87,7 @@ stdenv.mkDerivation rec {
     # Disable specific tests
     substituteInPlace src/dir.proj \
       --replace 'dotnet test Test/Test.csproj' \
-                "dotnet test Test/Test.csproj --filter '${lib.concatStringsSep "&amp;" disabledTests}'"
+                "dotnet test Test/Test.csproj --filter '${lib.concatStringsSep "&amp;" (map (x: "FullyQualifiedName!=${x}") disabledTests)}'"
 
     # We don't use a Git checkout
     substituteInPlace src/dir.proj \
@@ -137,18 +134,21 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  disabledTests = [
-    # Self-updating is patched out, hence this test will fail
-    "FullyQualifiedName!=GitHub.Runner.Common.Tests.Listener.SelfUpdaterL0.TestSelfUpdateAsync_ValidateHash"
-    "FullyQualifiedName!=GitHub.Runner.Common.Tests.Listener.SelfUpdaterL0.TestSelfUpdateAsync"
-    "FullyQualifiedName!=GitHub.Runner.Common.Tests.Listener.RunnerL0.TestRunOnceHandleUpdateMessage"
-  ] ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
-    # "JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64"
-    "FullyQualifiedName!=GitHub.Runner.Common.Tests.Worker.StepHostL0.DetermineNodeRuntimeVersionInAlpineContainerAsync"
-  ] ++ map
-    # Online tests
-    (x: "FullyQualifiedName!=GitHub.Runner.Common.Tests.Worker.ActionManagerL0.PrepareActions_${x}")
-    [
+  # Fully qualified name of disabled tests
+  disabledTests =
+    [ "GitHub.Runner.Common.Tests.Listener.SelfUpdaterL0.TestSelfUpdateAsync" ]
+    ++ map (x: "GitHub.Runner.Common.Tests.Listener.SelfUpdaterL0.TestSelfUpdateAsync_${x}") [
+      "Cancel_CloneHashTask_WhenNotNeeded"
+      "CloneHash_RuntimeAndExternals"
+      "DownloadRetry"
+      "FallbackToFullPackage"
+      "NoUpdateOnOldVersion"
+      "NotUseExternalsRuntimeTrimmedPackageOnHashMismatch"
+      "UseExternalsRuntimeTrimmedPackage"
+      "UseExternalsTrimmedPackage"
+      "ValidateHash"
+    ]
+    ++ map (x: "GitHub.Runner.Common.Tests.Worker.ActionManagerL0.PrepareActions_${x}") [
       "CompositeActionWithActionfile_CompositeContainerNested"
       "CompositeActionWithActionfile_CompositePrestepNested"
       "CompositeActionWithActionfile_MaxLimit"
@@ -178,11 +178,15 @@ stdenv.mkDerivation rec {
       "RepositoryActionWithInvalidWrapperActionfile_Node_Legacy"
       "RepositoryActionWithWrapperActionfile_PreSteps"
       "RepositoryActionWithWrapperActionfile_PreSteps_Legacy"
-    ] ++ map
-    (x: "FullyQualifiedName!=GitHub.Runner.Common.Tests.DotnetsdkDownloadScriptL0.${x}")
-    [
+    ]
+    ++ map (x: "GitHub.Runner.Common.Tests.DotnetsdkDownloadScriptL0.${x}") [
       "EnsureDotnetsdkBashDownloadScriptUpToDate"
       "EnsureDotnetsdkPowershellDownloadScriptUpToDate"
+    ]
+    ++ [ "GitHub.Runner.Common.Tests.Listener.RunnerL0.TestRunOnceHandleUpdateMessage" ]
+    ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
+      # "JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64"
+      "GitHub.Runner.Common.Tests.Worker.StepHostL0.DetermineNodeRuntimeVersionInAlpineContainerAsync"
     ];
 
   checkInputs = [ git ];
@@ -194,6 +198,8 @@ stdenv.mkDerivation rec {
     ln -s ${nodejs-12_x} _layout/externals/node12
     ln -s ${nodejs-16_x} _layout/externals/node16
 
+    printf 'Disabled tests:\n%s\n' '${lib.concatMapStringsSep "\n" (x: " - ${x}") disabledTests}'
+
     # BUILDCONFIG needs to be "Debug"
     dotnet msbuild \
       -t:test \
@@ -290,6 +296,9 @@ stdenv.mkDerivation rec {
     name = "create-deps-file";
     runtimeInputs = [ dotnetSdk nuget-to-nix ];
     text = ''
+      # Disable telemetry data
+      export DOTNET_CLI_TELEMETRY_OPTOUT=1
+
       rundir=$(pwd)
 
       printf "\n* Setup workdir\n"
diff --git a/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch b/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch
deleted file mode 100644
index da73cd75a096c..0000000000000
--- a/pkgs/development/tools/continuous-integration/github-runner/patches/prevent-self-update.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 8b77c9c61058842e031dd176df2b9c79bc2c0e28 Mon Sep 17 00:00:00 2001
-From: Vincent Haupert <mail@vincent-haupert.de>
-Date: Sun, 12 Sep 2021 19:52:21 +0200
-Subject: [PATCH] Use a fake version to prevent self-update
-
----
- src/Runner.Listener/MessageListener.cs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Runner.Listener/MessageListener.cs b/src/Runner.Listener/MessageListener.cs
-index 71e5e43..29945e0 100644
---- a/src/Runner.Listener/MessageListener.cs
-+++ b/src/Runner.Listener/MessageListener.cs
-@@ -65,7 +65,7 @@ namespace GitHub.Runner.Listener
-             {
-                 Id = _settings.AgentId,
-                 Name = _settings.AgentName,
--                Version = BuildConstants.RunnerPackage.Version,
-+                Version = "2.999.9",
-                 OSDescription = RuntimeInformation.OSDescription,
-             };
-             string sessionName = $"{Environment.MachineName ?? "RUNNER"}";
--- 
-2.32.0
-