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

Container Image should be an input into computing the task version #2194

Merged
merged 3 commits into from
Feb 17, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Feb 16, 2024

Tracking issue

flyteorg/flyte#4904

Why are the changes needed?

Failed to register a workflow if users update the dependencies in the requirement.txt in the imageSpec.

What changes were proposed in this pull request?

hash should be calculated from the image spec and workflow file

How was this patch tested?

pyflyte run

Setup process

from flytekit import task, workflow
from flytekit.image_spec import ImageSpec

image_spec2 = ImageSpec(
    requirements="requirements.txt",  # python packages to install
    registry="pingsutw")


@task(container_image=image_spec2)
def say_hello(name: str) -> str:
    return f"hello {name}!"


@workflow
def sub_wf(name: str = "union"):
    say_hello(name=name)


@workflow
def wf(name: str = "union"):
    sub_wf(name=name)

Screenshots

Check all the applicable boxes

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

Related PRs

NA

Docs link

NA

Signed-off-by: Kevin Su <pingsutw@gmail.com>
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

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

Comparison is base (ea8687b) 80.43% compared to head (3a76711) 85.53%.
Report is 15 commits behind head on master.

Files Patch % Lines
flytekit/remote/remote.py 75.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2194      +/-   ##
==========================================
+ Coverage   80.43%   85.53%   +5.09%     
==========================================
  Files         176      309     +133     
  Lines       17178    23460    +6282     
  Branches     3545     3630      +85     
==========================================
+ Hits        13817    20066    +6249     
- Misses       2732     2752      +20     
- Partials      629      642      +13     

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

@pingsutw pingsutw self-assigned this Feb 16, 2024
Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

Can you add a few tests?

wild-endeavor
wild-endeavor previously approved these changes Feb 16, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Feb 16, 2024
Signed-off-by: Kevin Su <pingsutw@gmail.com>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 16, 2024
Signed-off-by: Kevin Su <pingsutw@gmail.com>
@pingsutw
Copy link
Member Author

pingsutw commented Feb 16, 2024

Can you add a few tests?

done

@pingsutw pingsutw merged commit 05378f6 into master Feb 17, 2024
79 of 81 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
…2194)

Signed-off-by: Kevin Su <pingsutw@gmail.com>
Signed-off-by: Jan Fiedler <jan@union.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants