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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ddl-ebrown
Copy link

@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 2 times, most recently from fb8cbf3 to f237b5c Compare May 19, 2024 05:33
 - 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]>
@ddl-ebrown ddl-ebrown force-pushed the add-custom_info-to-Resource branch from f237b5c to 2fd654a Compare May 19, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant