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

Propagate custom_info Dict through agent Resource #2426

Merged

Conversation

ddl-ebrown
Copy link
Contributor

@ddl-ebrown ddl-ebrown commented May 16, 2024

See also flyteorg/flyte#5391

Tracking issue

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

@ddl-ebrown ddl-ebrown force-pushed the add-custom_info-to-Resource branch 7 times, most recently from 51c3825 to 67865b7 Compare May 18, 2024 22:38
Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 77.62%. Comparing base (70332db) to head (2fd654a).
Report is 1 commits behind head on master.

Files Patch % Lines
flytekit/extend/backend/base_agent.py 52.94% 8 Missing ⚠️
flytekit/extend/backend/agent_service.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2426      +/-   ##
==========================================
+ Coverage   72.10%   77.62%   +5.51%     
==========================================
  Files         181      238      +57     
  Lines       18395    20841    +2446     
  Branches     3601     3600       -1     
==========================================
+ Hits        13264    16178    +2914     
+ Misses       4506     4062     -444     
+ Partials      625      601      -24     

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

@ddl-ebrown ddl-ebrown force-pushed the add-custom_info-to-Resource branch 3 times, most recently from 1218914 to b337afe Compare May 18, 2024 23:16
@ddl-ebrown ddl-ebrown force-pushed the add-custom_info-to-Resource branch 3 times, most recently from f237b5c to 2fd654a Compare May 19, 2024 05:36
@ddl-rliu
Copy link
Contributor

Tracking issue: flyteorg/flyte#5603

@pingsutw
Copy link
Member

pingsutw commented Sep 5, 2024

@ddl-rliu Could you rebase the PR to fix the CI error?

@pingsutw
Copy link
Member

pingsutw commented Sep 5, 2024

something wrong in the github
Screenshot 2024-09-05 at 11 14 06 AM

@ddl-rliu ddl-rliu force-pushed the add-custom_info-to-Resource branch from f29140d to d56aea3 Compare September 5, 2024 18:15
@ddl-rliu
Copy link
Contributor

ddl-rliu commented Sep 5, 2024

Fixed!

pingsutw
pingsutw previously approved these changes Sep 9, 2024
@pingsutw
Copy link
Member

pingsutw commented Sep 9, 2024

@ddl-rliu overall lgtm, some tests are failing though.

ddl-ebrown and others added 2 commits September 12, 2024 16:10
 - The agent defines a Resource return type with values:

   * outputs
   * message
   * log_links
   * phase

   These are all a part of the underlying protobuf contract defined in
   flyteidl.

   However, the message field custom_info from the protobuf is not here

   google.protobuf.Struct custom_info

   https://github.com/flyteorg/flyte/blob/519080b6e4e53fc0e216b5715ad9b5b5270f35c0/flyteidl/protos/flyteidl/admin/agent.proto#L140

   This field was added in flyteorg/flyte#4874
   but never made it into the corresponding flytekit PR
   flyteorg#2146

 - It's useful for agents to return additional metadata about the job,
   and it looks like custom_info is the intended location

 - Make a minor refactor to how the agent responds to requests that
   return Resource by implementing to_flyte_idl / from_flyte_idl
   directly

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>
@ddl-rliu ddl-rliu force-pushed the add-custom_info-to-Resource branch from 46b56ad to 1a6348c Compare September 12, 2024 20:10
@ddl-rliu
Copy link
Contributor

test errors should be fixed now 👍

@eapolinario eapolinario merged commit 98d722f into flyteorg:master Sep 26, 2024
101 checks passed
otarabai pushed a commit to otarabai/flytekit that referenced this pull request Oct 15, 2024
* Propagate custom_info Dict through agent Resource

 - The agent defines a Resource return type with values:

   * outputs
   * message
   * log_links
   * phase

   These are all a part of the underlying protobuf contract defined in
   flyteidl.

   However, the message field custom_info from the protobuf is not here

   google.protobuf.Struct custom_info

   https://github.com/flyteorg/flyte/blob/519080b6e4e53fc0e216b5715ad9b5b5270f35c0/flyteidl/protos/flyteidl/admin/agent.proto#L140

   This field was added in flyteorg/flyte#4874
   but never made it into the corresponding flytekit PR
   flyteorg#2146

 - It's useful for agents to return additional metadata about the job,
   and it looks like custom_info is the intended location

 - Make a minor refactor to how the agent responds to requests that
   return Resource by implementing to_flyte_idl / from_flyte_idl
   directly

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>

* Fix test

Signed-off-by: ddl-rliu <[email protected]>

---------

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>
Co-authored-by: ddl-rliu <[email protected]>
@ddl-ebrown ddl-ebrown deleted the add-custom_info-to-Resource branch November 1, 2024 04:57
kumare3 pushed a commit that referenced this pull request Nov 8, 2024
* Propagate custom_info Dict through agent Resource

 - The agent defines a Resource return type with values:

   * outputs
   * message
   * log_links
   * phase

   These are all a part of the underlying protobuf contract defined in
   flyteidl.

   However, the message field custom_info from the protobuf is not here

   google.protobuf.Struct custom_info

   https://github.com/flyteorg/flyte/blob/519080b6e4e53fc0e216b5715ad9b5b5270f35c0/flyteidl/protos/flyteidl/admin/agent.proto#L140

   This field was added in flyteorg/flyte#4874
   but never made it into the corresponding flytekit PR
   #2146

 - It's useful for agents to return additional metadata about the job,
   and it looks like custom_info is the intended location

 - Make a minor refactor to how the agent responds to requests that
   return Resource by implementing to_flyte_idl / from_flyte_idl
   directly

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>

* Fix test

Signed-off-by: ddl-rliu <[email protected]>

---------

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>
Co-authored-by: ddl-rliu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants