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

Fix handling of ImageConfig creation #983

Merged
merged 3 commits into from
Apr 28, 2022
Merged

Fix handling of ImageConfig creation #983

merged 3 commits into from
Apr 28, 2022

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Apr 28, 2022

Signed-off-by: Yee Hing Tong [email protected]

TL;DR

  • Raise an exception if the arg to create_from is not an Image object.
  • Make from_images work.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

https://github.com/flyteorg/flyte/issues/

Follow-up issue

NA
OR
https://github.com/flyteorg/flyte/issues/

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor changed the title fixes Fix handling of ImageConfig creation Apr 28, 2022
EngHabu
EngHabu previously approved these changes Apr 28, 2022
def create_from(
cls, default_image: Optional[Image], other_images: typing.Optional[typing.List[Image]] = None
) -> ImageConfig:
if default_image and not isinstance(default_image, Image):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not a simple str too and then we do the conversion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add in a separate PR.

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #983 (c186196) into master (858aa65) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #983      +/-   ##
==========================================
+ Coverage   86.26%   86.28%   +0.01%     
==========================================
  Files         252      252              
  Lines       24129    24137       +8     
  Branches     2745     2747       +2     
==========================================
+ Hits        20815    20826      +11     
+ Misses       2846     2843       -3     
  Partials      468      468              
Impacted Files Coverage Δ
flytekit/configuration/__init__.py 94.88% <100.00%> (+1.08%) ⬆️
...s/flytekit/unit/configuration/test_image_config.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 858aa65...c186196. Read the comment docs.

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor merged commit 156e34f into master Apr 28, 2022
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