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

Adds validation to image_spec for parameters that are list of strings #2655

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

thomasjpfan
Copy link
Member

Tracking issue

Closes flyteorg/flyte#5632

Why are the changes needed?

Validation helps users avoid common mistakes.

What changes were proposed in this pull request?

This PR adds validation to all Optional[List[str]] in `ImageSpec

How was this patch tested?

Unit tests were added to this PR.

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.24%. Comparing base (d802c7e) to head (b75e7cc).
Report is 5 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (d802c7e) and HEAD (b75e7cc). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (d802c7e) HEAD (b75e7cc)
5 2
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2655       +/-   ##
===========================================
- Coverage   92.53%   76.24%   -16.29%     
===========================================
  Files          27      191      +164     
  Lines        1206    19455    +18249     
  Branches        0     3780     +3780     
===========================================
+ Hits         1116    14834    +13718     
- Misses         90     3960     +3870     
- Partials        0      661      +661     

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

Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

Maybe we should just convert ImageSpec to pydantic in the future. 😄

@eapolinario eapolinario merged commit 7f8b257 into flyteorg:master Aug 8, 2024
100 of 101 checks passed
mao3267 pushed a commit to mao3267/flytekit that referenced this pull request Aug 9, 2024
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: mao3267 <chenvincent610@gmail.com>
Mecoli1219 pushed a commit to Mecoli1219/flytekit that referenced this pull request Aug 14, 2024
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Mecoli1219 pushed a commit to Mecoli1219/flytekit that referenced this pull request Aug 14, 2024
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Mecoli1219 <michaellai901026@gmail.com>
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.

[BUG] FlyteKit's ImageSpec results in unexpected behavior with incorrect "packages" argument type.
3 participants