mirror of
https://github.com/actions/runner.git
synced 2025-12-26 03:17:32 +08:00
Change RunnerId/AgentId from int32 to uint64 (#2661)
* RunnerId int -> ulong
This commit is contained in:
@@ -97,7 +97,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
/// <param name="cancellationToken">The cancellation token to cancel operation.</param>
|
||||
public virtual async Task DeleteAgentAsync(
|
||||
int poolId,
|
||||
int agentId,
|
||||
ulong agentId,
|
||||
object userState = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
@@ -243,7 +243,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
/// <param name="cancellationToken">The cancellation token to cancel operation.</param>
|
||||
public virtual Task<TaskAgent> ReplaceAgentAsync(
|
||||
int poolId,
|
||||
int agentId,
|
||||
ulong agentId,
|
||||
TaskAgent agent,
|
||||
object userState = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
@@ -786,7 +786,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public virtual Task<TaskAgent> UpdateAgentUpdateStateAsync(
|
||||
int poolId,
|
||||
int agentId,
|
||||
ulong agentId,
|
||||
string currentState,
|
||||
string updateTrace,
|
||||
object userState = null,
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
|
||||
public AgentRefreshMessage(
|
||||
Int32 agentId,
|
||||
ulong agentId,
|
||||
String targetVersion,
|
||||
TimeSpan? timeout = null)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Int32 AgentId
|
||||
public ulong AgentId
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
[DataContract]
|
||||
public sealed class DiagnosticLogMetadata
|
||||
{
|
||||
public DiagnosticLogMetadata(string agentName, int agentId, int poolId, string phaseName, string fileName, string phaseResult)
|
||||
public DiagnosticLogMetadata(string agentName, ulong agentId, int poolId, string phaseName, string fileName, string phaseResult)
|
||||
{
|
||||
AgentName = agentName;
|
||||
AgentId = agentId;
|
||||
@@ -19,7 +19,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
public string AgentName { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int AgentId { get; set; }
|
||||
public ulong AgentId { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int PoolId { get; set; }
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
|
||||
[JsonProperty("id")]
|
||||
public Int32 Id
|
||||
public ulong Id
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
|
||||
public RunnerRefreshMessage(
|
||||
Int32 runnerId,
|
||||
ulong runnerId,
|
||||
String targetVersion,
|
||||
int? timeoutInSeconds = null)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public Int32 RunnerId
|
||||
public ulong RunnerId
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace GitHub.DistributedTask.WebApi
|
||||
/// Identifier of the agent.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Int32 Id
|
||||
public ulong Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
||||
@@ -86,6 +86,11 @@ namespace GitHub.Actions.RunService.WebApi
|
||||
return result.Value;
|
||||
}
|
||||
|
||||
if (result.StatusCode == HttpStatusCode.Forbidden)
|
||||
{
|
||||
throw new AccessDeniedException(result.Error);
|
||||
}
|
||||
|
||||
throw new Exception($"Failed to get job message: {result.Error}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user