-
Notifications
You must be signed in to change notification settings - Fork 301
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 union transformer #2024
Merged
Merged
Fix union transformer #2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Kevin Su <[email protected]>
pingsutw
requested review from
wild-endeavor,
kumare3,
eapolinario and
cosmicBboy
as code owners
December 5, 2023 20:54
Signed-off-by: Kevin Su <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2024 +/- ##
==========================================
- Coverage 86.22% 86.21% -0.01%
==========================================
Files 320 320
Lines 23531 23540 +9
Branches 3464 3466 +2
==========================================
+ Hits 20289 20296 +7
- Misses 2650 2652 +2
Partials 592 592 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <[email protected]>
eapolinario
reviewed
Dec 5, 2023
flytekit/core/type_engine.py
Outdated
@@ -1455,12 +1456,15 @@ def to_literal(self, ctx: FlyteContext, python_val: T, python_type: Type[T], exp | |||
res_type = _add_tag_to_type(trans.get_literal_type(t), trans.name) | |||
if found_res: | |||
# Should really never happen, sanity check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove the comment?
kumare3
previously approved these changes
Dec 5, 2023
Signed-off-by: Kevin Su <[email protected]>
eapolinario
approved these changes
Dec 5, 2023
RRap0so
pushed a commit
to RRap0so/flytekit
that referenced
this pull request
Dec 15, 2023
* Fix union transformer Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * fix test Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> --------- Signed-off-by: Kevin Su <[email protected]> Signed-off-by: Rafael Raposo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
Failed to convert a literal to python value
union[dataclass, dataclass]
.What changes were proposed in this pull request?
When converting literal to python value, union transformer should catch any kind of exception.
flytekit/flytekit/core/type_engine.py
Lines 1513 to 1514 in 5c6802c
How was this patch tested?
Run above workflow locally
Setup process
Screenshots
Check all the applicable boxes