Skip to content

add short_description to Task and Workflow model #3224

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

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

Conversation

cosmicBboy
Copy link
Contributor

@cosmicBboy cosmicBboy commented Apr 11, 2025

Why are the changes needed?

Currently, short_description is defined in the Task and Workflow protos but are not being piped through in the flytekit Task and Workflow models.

What changes were proposed in this pull request?

  • flytekit.models.tasks.Task now takes a short_description as input
  • flytekit.models.admin.workflow.Workflow now takes a short_description as input

How was this patch tested?

Unit tests were updates

Summary by Bito

This PR adds a new short_description parameter to Task and Workflow classes in flytekit models, including constructor modifications, property methods, and updated serialization for protocol buffer conversion. Tests have been updated to verify these new capabilities.

Unit tests added: True

Estimated effort to review (1-5, lower is better): 2

@flyte-bot
Copy link
Contributor

flyte-bot commented Apr 11, 2025

Code Review Agent Run #7f0c3a

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: 1cb6ad0..1cb6ad0
    • flytekit/models/admin/workflow.py
    • flytekit/models/task.py
    • tests/flytekit/unit/remote/test_remote.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

Refer to the documentation for additional commands.

Configuration

This repository uses code_review_bito You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@@ -70,13 +70,14 @@ def from_flyte_idl(cls, pb2_object):


class Workflow(_common.FlyteIdlEntity):
def __init__(self, id, closure):
def __init__(self, id, closure, short_description):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

does this need to be short_description = None for backwards compat?

@flyte-bot
Copy link
Contributor

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
New Feature - Model Enhancement: Add short_description

workflow.py - Constructor updated to include short_description, property added for accessing it, and workflow serialization updated to pass the new field.

task.py - Constructor updated to include short_description, property added for accessing it, and task serialization updated to incorporate the new field.

Testing - Test Update: Incorporate short_description

test_remote.py - Test cases adjusted to supply short_description for both Task and Workflow objects, ensuring the new parameter is correctly handled.

Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 52.16%. Comparing base (33197e7) to head (1cb6ad0).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
flytekit/models/admin/workflow.py 66.66% 2 Missing ⚠️
flytekit/models/task.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3224   +/-   ##
=======================================
  Coverage   52.15%   52.16%           
=======================================
  Files         214      214           
  Lines       22299    22307    +8     
  Branches     2924     2924           
=======================================
+ Hits        11630    11636    +6     
- Misses       9986     9988    +2     
  Partials      683      683           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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