Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Actions Directly From Launch for Run Service Jobs #2529

Merged
merged 34 commits into from
May 3, 2023

Conversation

jherns
Copy link
Contributor

@jherns jherns commented Apr 12, 2023

  • Create LaunchHttpClient
  • Create LaunchServer
  • Initialize LaunchServer within JobServerQueue
  • Initialize JobServerQueue when running Run Service Jobs
  • Store the job request type in the Global Context so that it can be used in ActionManager
  • When running a Run Service Job, use the Launch Client to resolve actions instead of Action Service

public string Action { get; set; }

[DataMember(EmitDefaultValue = false, Name = "version")]
public string Version { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is currently called Ref instead of Version, what's the reason for the rename?

Copy link
Contributor Author

@jherns jherns May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied pretty much directly from https://github.com/github/actions-dotnet/blob/179ed33568dd1ad80c457fb1c328c964e372accf/Launch/Sdk/Server/Models/GitHub.cs#L90-L152. Since the runner is now the one receiving the payload from launch, it needs to parse the JSON payload the same way. The same goes for sending the payload to Launch. The runner needs to serialize the data into JSON that Launch expects. I don't believe this is a rename

public string Version { get; set; }

[DataMember(EmitDefaultValue = false, Name = "path")]
public string Path { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the server care about the Path of the action?

public string TarUrl { get; set; }

[DataMember(EmitDefaultValue = false, Name = "version")]
public string Version { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question about version vs ref

public class ActionDownloadAuthenticationResponse
{
[DataMember(EmitDefaultValue = false, Name = "expires_at")]
public DateTime ExpiresAt { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really care about the token's expiresAt?

Copy link
Contributor Author

@jherns jherns May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

[DataContract]
public class ActionReferenceRequestList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need an object to wrap around a list?
Can we just send the List as json to service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint for resolving actions expects an object wrapped around a list

}

[DataContract]
public class ActionDownloadInfoResponseCollection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question, why do we need this wrapper around a dictionary?

@jherns jherns requested a review from TingluoHuang May 3, 2023 16:17
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
@TingluoHuang TingluoHuang merged commit 22d1938 into actions:main May 3, 2023
nikola-jokic pushed a commit to nikola-jokic/runner that referenced this pull request May 12, 2023

Co-authored-by: Tingluo Huang <tingluohuang@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants