Create Release 2.283.2 (#1394)
* Update telemetry (#1355) * Track "pause-logging" * Bump release version * Don't retry 422 (#1352) * Update the comment about the `--once` in Constants.cs (#1360) * Update Constants.cs * feedback. * Update src/Runner.Listener/Runner.cs Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Fix unconfiguring of runner after group changes (#1359) * Ignore agentpool when unconfiguring the runner Runner names and IDs are unique within a ServiceHost They don't need to be included when unconfiguring the runner. * Use -1 instead of 0 to highlight how it is ignored * Use overloads and 0 instead of -1 Using 0 seems to be the convention * Fix typo calling the wrong method * only cleanup runner local files on success (#1384) * Stop-Commands: stopToken restrictions (#1371) * Prevent stopTokens that are workflow commands Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Check context for env var too * Accept true, 1 and $true instead of just "true" * Setup ExpressionValues in tests * Update src/Runner.Common/Constants.cs Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Separate success and fail tests for invalid token * Fix envcontext for tests Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Handle keeping previous OSX versions more smoothly on Mac (#1381) * Handle macOS upgrade smoothly * cleanup * misc cleanup * final updates * Update src/Misc/layoutbin/update.sh.template Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com> * Update src/Misc/layoutbin/update.sh.template Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com> * Upload telemetry and default to old method as needed * minor fix * add one more bit of logging * some more telemetry * quote variables to handle spaces * tiny fix for ubuntu * remove version and move telemetry to diag * use full path Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com> * Runner 2.283.2 Release (#1389) Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> Co-authored-by: Tingluo Huang <tingluohuang@github.com> Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com>
This commit is contained in:
co-authored by
Thomas Boop
Tingluo Huang
Patrick Ellis
parent
e6baf0d275
commit
b53b520498
@@ -26,6 +26,7 @@ namespace GitHub.Runner.Common
|
||||
Certificates,
|
||||
Options,
|
||||
SetupInfo,
|
||||
Telemetry
|
||||
}
|
||||
|
||||
public static class Constants
|
||||
@@ -128,7 +129,7 @@ namespace GitHub.Runner.Common
|
||||
public static readonly string Ephemeral = "ephemeral";
|
||||
public static readonly string Help = "help";
|
||||
public static readonly string Replace = "replace";
|
||||
public static readonly string Once = "once"; // TODO: Remove in 10/2021
|
||||
public static readonly string Once = "once"; // Keep this around since customers still relies on it
|
||||
public static readonly string RunAsService = "runasservice";
|
||||
public static readonly string Unattended = "unattended";
|
||||
public static readonly string Version = "version";
|
||||
@@ -154,6 +155,7 @@ namespace GitHub.Runner.Common
|
||||
public static readonly string LowDiskSpace = "LOW_DISK_SPACE";
|
||||
public static readonly string UnsupportedCommand = "UNSUPPORTED_COMMAND";
|
||||
public static readonly string UnsupportedCommandMessageDisabled = "The `{0}` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/";
|
||||
public static readonly string UnsupportedStopCommandTokenDisabled = "You cannot use a endToken that is an empty string, the string 'pause-logging', or another workflow command. For more information see: https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#example-stopping-and-starting-workflow-commands or opt into insecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_STOPCOMMAND_TOKENS` environment variable to `true`.";
|
||||
}
|
||||
|
||||
public static class RunnerEvent
|
||||
@@ -213,6 +215,7 @@ namespace GitHub.Runner.Common
|
||||
// Keep alphabetical
|
||||
//
|
||||
public static readonly string AllowUnsupportedCommands = "ACTIONS_ALLOW_UNSECURE_COMMANDS";
|
||||
public static readonly string AllowUnsupportedStopCommandTokens = "ACTIONS_ALLOW_UNSECURE_STOPCOMMAND_TOKENS";
|
||||
public static readonly string RunnerDebug = "ACTIONS_RUNNER_DEBUG";
|
||||
public static readonly string StepDebug = "ACTIONS_STEP_DEBUG";
|
||||
}
|
||||
|
||||
@@ -342,6 +342,12 @@ namespace GitHub.Runner.Common
|
||||
GetDirectory(WellKnownDirectory.Root),
|
||||
".setup_info");
|
||||
break;
|
||||
|
||||
case WellKnownConfigFile.Telemetry:
|
||||
path = Path.Combine(
|
||||
GetDirectory(WellKnownDirectory.Diag),
|
||||
".telemetry");
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotSupportedException($"Unexpected well known config file: '{configFile}'");
|
||||
|
||||
@@ -29,8 +29,10 @@ namespace GitHub.Runner.Common
|
||||
// Configuration
|
||||
Task<TaskAgent> AddAgentAsync(Int32 agentPoolId, TaskAgent agent);
|
||||
Task DeleteAgentAsync(int agentPoolId, int agentId);
|
||||
Task DeleteAgentAsync(int agentId);
|
||||
Task<List<TaskAgentPool>> GetAgentPoolsAsync(string agentPoolName = null, TaskAgentPoolType poolType = TaskAgentPoolType.Automation);
|
||||
Task<List<TaskAgent>> GetAgentsAsync(int agentPoolId, string agentName = null);
|
||||
Task<List<TaskAgent>> GetAgentsAsync(string agentName);
|
||||
Task<TaskAgent> ReplaceAgentAsync(int agentPoolId, TaskAgent agent);
|
||||
|
||||
// messagequeue
|
||||
@@ -252,6 +254,11 @@ namespace GitHub.Runner.Common
|
||||
return _genericTaskAgentClient.GetAgentsAsync(agentPoolId, agentName, false);
|
||||
}
|
||||
|
||||
public Task<List<TaskAgent>> GetAgentsAsync(string agentName)
|
||||
{
|
||||
return GetAgentsAsync(0, agentName); // search in all all agentPools
|
||||
}
|
||||
|
||||
public Task<TaskAgent> ReplaceAgentAsync(int agentPoolId, TaskAgent agent)
|
||||
{
|
||||
CheckConnection(RunnerConnectionType.Generic);
|
||||
@@ -264,6 +271,11 @@ namespace GitHub.Runner.Common
|
||||
return _genericTaskAgentClient.DeleteAgentAsync(agentPoolId, agentId);
|
||||
}
|
||||
|
||||
public Task DeleteAgentAsync(int agentId)
|
||||
{
|
||||
return DeleteAgentAsync(0, agentId); // agentPool is ignored server side
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
// MessageQueue
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user