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

[flyteagent] Add Logging for Agent Supported Task Types #5718

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Sep 3, 2024

Tracking issue

#3936

Why are the changes needed?

We want to know whether the propeller received the expected Supported Task Types from each Agent Deployment and all Supported Task Types.

https://flyte-org.slack.com/archives/C06SYN9QJ5N/p1724970466413009

What changes were proposed in this pull request?

Summary

Add logs to track the Supported Task Types for each deployment and across all deployments.

Details

Use map[string]struct{} to store supported task types because current flytekit will return SupportedTaskTypes and supportedTaskCategories with same metadata, which will make us get duplicate data

image image

How was this patch tested?

  • single binary
  • setup 2 endpoints, localhost:8000 and localhost:8001.
image image
  agent-service:
    defaultAgent:
      endpoint: "localhost:8000"    
      insecure: true
      timeouts:
        CreateTask: 100s
        GetTask: 100s
      defaultTimeout: 100s
    agents:
      custom_agent:
        endpoint: "localhost:8001"
        insecure: true
        timeouts:
          ExecuteTaskSync: 300s
          GetTask: 100s
        defaultTimeout: 300s
{"json":{"src":"client.go:149"},"level":"info","msg":"AgentDeployment [localhost:8000] supports the following task types: [snowflake, sensor]","ts":"2024-09-03T11:42:36+08:00"}
{"json":{"src":"client.go:149"},"level":"info","msg":"AgentDeployment [localhost:8001] supports the following task types: [sensor, snowflake, openai-batch, chatgpt]","ts":"2024-09-03T11:42:36+08:00"}
{"json":{"src":"client.go:171"},"level":"info","msg":"AgentDeployments support the following task types: [sensor, snowflake, openai-batch, chatgpt, task_type_1, task_type_2]","ts":"2024-09-03T11:42:36+08:00"}

Screenshots

image

Check all the applicable boxes

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

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.17%. Comparing base (96c799c) to head (d7a7b82).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...yteplugins/go/tasks/plugins/webapi/agent/client.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5718   +/-   ##
=======================================
  Coverage   36.16%   36.17%           
=======================================
  Files        1303     1303           
  Lines      109661   109668    +7     
=======================================
+ Hits        39664    39671    +7     
  Misses      65852    65852           
  Partials     4145     4145           
Flag Coverage Δ
unittests-datacatalog 51.37% <ø> (ø)
unittests-flyteadmin 55.28% <ø> (ø)
unittests-flytecopilot 12.17% <ø> (ø)
unittests-flytectl 62.17% <ø> (ø)
unittests-flyteidl 7.12% <ø> (ø)
unittests-flyteplugins 53.36% <87.50%> (+0.01%) ⬆️
unittests-flytepropeller 41.76% <ø> (ø)
unittests-flytestdlib 55.35% <ø> (+0.02%) ⬆️

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.

@Future-Outlier Future-Outlier marked this pull request as draft September 3, 2024 03:38
Signed-off-by: Future-Outlier <[email protected]>
@Future-Outlier Future-Outlier marked this pull request as ready for review September 3, 2024 03:46
Copy link

@shuyingliang shuyingliang left a comment

Choose a reason for hiding this comment

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

LG. Thanks for improving the log!

@Future-Outlier Future-Outlier merged commit 61e75da into master Sep 3, 2024
50 checks passed
@Future-Outlier Future-Outlier deleted the agent-list-supported-task-categories branch September 3, 2024 05:11
pmahindrakar-oss pushed a commit that referenced this pull request Sep 9, 2024
* Add Logging for Agent-Supported Task Types

Signed-off-by: Future-Outlier <[email protected]>

* use make(map[string]struct{})

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: pmahindrakar-oss <[email protected]>
pmahindrakar-oss pushed a commit that referenced this pull request Sep 9, 2024
* Add Logging for Agent-Supported Task Types

Signed-off-by: Future-Outlier <[email protected]>

* use make(map[string]struct{})

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: pmahindrakar-oss <[email protected]>
bgedik pushed a commit to bgedik/flyte that referenced this pull request Sep 12, 2024
* Add Logging for Agent-Supported Task Types

Signed-off-by: Future-Outlier <[email protected]>

* use make(map[string]struct{})

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>
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