From c3c66bb14a4d6a1e9fdd9168d0ba9286053e5eb1 Mon Sep 17 00:00:00 2001 From: Julio Barba Date: Mon, 16 Dec 2019 15:45:00 -0500 Subject: [PATCH] Replace remaining Agent -> Runner references (#229) --- src/Runner.Listener/Configuration/IRSAKeyManager.cs | 8 ++++---- .../Configuration/NativeWindowsServiceHelper.cs | 6 +++--- src/Runner.Listener/MessageListener.cs | 10 +++++----- src/Runner.Listener/Runner.cs | 2 +- src/Runner.Worker/ContainerOperationProvider.cs | 4 ++-- src/Runner.Worker/Handlers/HandlerFactory.cs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Runner.Listener/Configuration/IRSAKeyManager.cs b/src/Runner.Listener/Configuration/IRSAKeyManager.cs index 11778e126..53fcf8170 100644 --- a/src/Runner.Listener/Configuration/IRSAKeyManager.cs +++ b/src/Runner.Listener/Configuration/IRSAKeyManager.cs @@ -6,7 +6,7 @@ using GitHub.Runner.Common; namespace GitHub.Runner.Listener.Configuration { /// - /// Manages an RSA key for the agent using the most appropriate store for the target platform. + /// Manages an RSA key for the runner using the most appropriate store for the target platform. /// #if OS_WINDOWS [ServiceLocator(Default = typeof(RSAEncryptedFileKeyManager))] @@ -16,10 +16,10 @@ namespace GitHub.Runner.Listener.Configuration public interface IRSAKeyManager : IRunnerService { /// - /// Creates a new RSACryptoServiceProvider instance for the current agent. If a key file is found then the current + /// Creates a new RSACryptoServiceProvider instance for the current runner. If a key file is found then the current /// key is returned to the caller. /// - /// An RSACryptoServiceProvider instance representing the key for the agent + /// An RSACryptoServiceProvider instance representing the key for the runner RSACryptoServiceProvider CreateKey(); /// @@ -30,7 +30,7 @@ namespace GitHub.Runner.Listener.Configuration /// /// Gets the RSACryptoServiceProvider instance currently stored by the key manager. /// - /// An RSACryptoServiceProvider instance representing the key for the agent + /// An RSACryptoServiceProvider instance representing the key for the runner /// No key exists in the store RSACryptoServiceProvider GetKey(); } diff --git a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs index 21824f99d..28dc257b4 100644 --- a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs +++ b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs @@ -447,7 +447,7 @@ namespace GitHub.Runner.Listener.Configuration { Trace.Entering(); - string agentServiceExecutable = "\"" + Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Bin), WindowsServiceControlManager.WindowsServiceControllerName) + "\""; + string runnerServiceExecutable = "\"" + Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Bin), WindowsServiceControlManager.WindowsServiceControllerName) + "\""; IntPtr scmHndl = IntPtr.Zero; IntPtr svcHndl = IntPtr.Zero; IntPtr tmpBuf = IntPtr.Zero; @@ -468,7 +468,7 @@ namespace GitHub.Runner.Listener.Configuration }; processInvoker.ExecuteAsync(workingDirectory: string.Empty, - fileName: agentServiceExecutable, + fileName: runnerServiceExecutable, arguments: "init", environment: null, requireExitCodeZero: true, @@ -490,7 +490,7 @@ namespace GitHub.Runner.Listener.Configuration SERVICE_WIN32_OWN_PROCESS, ServiceBootFlag.AutoStart, ServiceError.Normal, - agentServiceExecutable, + runnerServiceExecutable, null, IntPtr.Zero, null, diff --git a/src/Runner.Listener/MessageListener.cs b/src/Runner.Listener/MessageListener.cs index ce35f26cc..53e8b8d4b 100644 --- a/src/Runner.Listener/MessageListener.cs +++ b/src/Runner.Listener/MessageListener.cs @@ -80,7 +80,7 @@ namespace GitHub.Runner.Listener Trace.Info($"Attempt to create session."); try { - Trace.Info("Connecting to the Agent Server..."); + Trace.Info("Connecting to the Runner Server..."); await _runnerServer.ConnectAsync(new Uri(serverUrl), creds); Trace.Info("VssConnection created"); @@ -110,7 +110,7 @@ namespace GitHub.Runner.Listener } catch (TaskAgentAccessTokenExpiredException) { - Trace.Info("Agent OAuth token has been revoked. Session creation failed."); + Trace.Info("Runner OAuth token has been revoked. Session creation failed."); throw; } catch (Exception ex) @@ -190,7 +190,7 @@ namespace GitHub.Runner.Listener } catch (TaskAgentAccessTokenExpiredException) { - Trace.Info("Agent OAuth token has been revoked. Unable to pull message."); + Trace.Info("Runner OAuth token has been revoked. Unable to pull message."); throw; } catch (Exception ex) @@ -336,7 +336,7 @@ namespace GitHub.Runner.Listener { if (ex is TaskAgentNotFoundException) { - Trace.Info("The agent no longer exists on the server. Stopping the runner."); + Trace.Info("The runner no longer exists on the server. Stopping the runner."); _term.WriteError("The runner no longer exists on the server. Please reconfigure the runner."); return false; } @@ -364,7 +364,7 @@ namespace GitHub.Runner.Listener } else if (ex is VssOAuthTokenRequestException && ex.Message.Contains("Current server time is")) { - Trace.Info("Local clock might skewed."); + Trace.Info("Local clock might be skewed."); _term.WriteError("The local machine's clock may be out of sync with the server time by more than five minutes. Please sync your clock with your domain or internet time and try again."); if (_sessionCreationExceptionTracker.ContainsKey(nameof(VssOAuthTokenRequestException))) { diff --git a/src/Runner.Listener/Runner.cs b/src/Runner.Listener/Runner.cs index 85cda747f..d9cc2c783 100644 --- a/src/Runner.Listener/Runner.cs +++ b/src/Runner.Listener/Runner.cs @@ -434,7 +434,7 @@ namespace GitHub.Runner.Listener } catch (TaskAgentAccessTokenExpiredException) { - Trace.Info("Agent OAuth token has been revoked. Shutting down."); + Trace.Info("Runner OAuth token has been revoked. Shutting down."); } return Constants.Runner.ReturnCode.Success; diff --git a/src/Runner.Worker/ContainerOperationProvider.cs b/src/Runner.Worker/ContainerOperationProvider.cs index 162c55a14..a476b5464 100644 --- a/src/Runner.Worker/ContainerOperationProvider.cs +++ b/src/Runner.Worker/ContainerOperationProvider.cs @@ -48,7 +48,7 @@ namespace GitHub.Runner.Worker displayName: "Stop containers", data: data); - executionContext.Debug($"Register post job cleanup for stoping/deleting containers."); + executionContext.Debug($"Register post job cleanup for stopping/deleting containers."); executionContext.RegisterPostJobStep(nameof(StopContainersAsync), postJobStep); // Check whether we are inside a container. @@ -129,7 +129,7 @@ namespace GitHub.Runner.Worker executionContext.Warning($"Delete stale container networks failed, docker network prune fail with exit code {networkPruneExitCode}"); } - // Create local docker network for this job to avoid port conflict when multiple agents run on same machine. + // Create local docker network for this job to avoid port conflict when multiple runners run on same machine. // All containers within a job join the same network var containerNetwork = $"github_network_{Guid.NewGuid().ToString("N")}"; await CreateContainerNetworkAsync(executionContext, containerNetwork); diff --git a/src/Runner.Worker/Handlers/HandlerFactory.cs b/src/Runner.Worker/Handlers/HandlerFactory.cs index 2aac69d5a..0f2413ef5 100644 --- a/src/Runner.Worker/Handlers/HandlerFactory.cs +++ b/src/Runner.Worker/Handlers/HandlerFactory.cs @@ -62,7 +62,7 @@ namespace GitHub.Runner.Worker.Handlers } else if (data.ExecutionType == ActionExecutionType.Plugin) { - // Agent plugin + // Runner plugin handler = HostContext.CreateService(); (handler as IRunnerPluginHandler).Data = data as PluginActionExecutionData; }