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

Agents protocol updates #4775

Closed
wants to merge 10 commits into from
Closed

Agents protocol updates #4775

wants to merge 10 commits into from

Conversation

EngHabu
Copy link
Contributor

@EngHabu EngHabu commented Jan 24, 2024

Tracking issue

https://github.com/flyteorg/flyte/issues/

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (55a67f2) 58.50% compared to head (660b9bc) 59.02%.
Report is 1 commits behind head on master.

Files Patch % Lines
...yteplugins/go/tasks/plugins/webapi/agent/plugin.go 63.63% 13 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4775      +/-   ##
==========================================
+ Coverage   58.50%   59.02%   +0.52%     
==========================================
  Files         494      645     +151     
  Lines       42788    55176   +12388     
==========================================
+ Hits        25032    32568    +7536     
- Misses      15759    20029    +4270     
- Partials     1997     2579     +582     
Flag Coverage Δ
unittests 59.02% <67.34%> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Haytham Abuelfutuh <[email protected]>
@@ -21,6 +20,12 @@ enum State {
SUCCEEDED = 4;
}

// TaskOverrides is a set of overrides that can be applied to a task.
message TaskOverrides {
Copy link
Contributor

Choose a reason for hiding this comment

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

did you not want to use this -

message TaskNodeOverrides {
just to keep in separate and name clean? (I agree)

};

// CreateTask sends a task create request to the agent service.
rpc CreateTask (stream flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){
Copy link
Contributor

Choose a reason for hiding this comment

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

why should this be a stream? isnt that potentially dangerous?

// included in this map. If not required and not provided, defaults apply.
// +optional
core.LiteralMap inputs = 1;
oneof part {
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels odd and does not seem to have a clear understanding of what will be sent.
Inputs and header should always be sent i feel.

IMO, CreateTask should remain sync, we can add a ExecuteSyncStream that sounds like a better option if we need stream

// Prefix for where task output data will be written. (e.g. s3://my-bucket/randomstring)
string output_prefix = 3;
string output_prefix = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

checkpoint?

// Get job status.
rpc GetTask (flyteidl.admin.GetTaskRequest) returns (flyteidl.admin.GetTaskResponse){};
rpc GetTask (flyteidl.admin.GetTaskRequest) returns (stream flyteidl.admin.GetTaskResponse){
Copy link
Contributor

Choose a reason for hiding this comment

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

this stream also seems odd?
Maybe this is the problem with async vs sync.
Async being a stream is really odd?

// Send a task create request to the agent server.
rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){};
// ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back.
rpc ExecuteTaskSync (stream flyteidl.admin.ExecuteTaskSyncRequest) returns (stream flyteidl.admin.ExecuteTaskSyncResponse){
Copy link
Contributor

Choose a reason for hiding this comment

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

i like this stream

@EngHabu
Copy link
Contributor Author

EngHabu commented Feb 22, 2024

closing in favor of #4874

@EngHabu EngHabu closed this Feb 22, 2024
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.

3 participants