Repository navigation
[Fix] Error when using FlyteFile as default value in workflow - #3322
Conversation
| self, value: typing.Any, param: typing.Optional[click.Parameter], ctx: typing.Optional[click.Context] | ||
| ) -> typing.Any: | ||
| if isinstance(value, ArtifactQuery): | ||
| if isinstance(value, (ArtifactQuery, FlyteFile)): |
There was a problem hiding this comment.
Do we also need to update DirParamType for FlyteDirectory?
There was a problem hiding this comment.
Sure! I'll open a follow-up PR for updating DirParamType
-e Signed-off-by: machichima <nary12321@gmail.com>
-e Signed-off-by: machichima <nary12321@gmail.com>
d8fe46d to
c7014ac
Compare
|
Bito Automatic Review Failed - Technical Failure |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3322 +/- ##
=======================================
Coverage 52.64% 52.64%
=======================================
Files 215 215
Lines 22543 22544 +1
Branches 2950 2950
=======================================
+ Hits 11868 11869 +1
Misses 9968 9968
Partials 707 707 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rg#3322) Signed-off-by: machichima <nary12321@gmail.com> Signed-off-by: Atharva <atharvakulkarni172003@gmail.com>

Tracking issue
Why are the changes needed?
When running local workflow with the default args value set as
FlyteFile, we will get following error:What changes were proposed in this pull request?
FileParamType'sconvertfunction, if the value is alreadyFlyteFile, directly return value to prevent creating the nestedFlyteFileHow was this patch tested?
Test by running script:
Setup process
Screenshots
Result after my modification
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito
This pull request fixes a bug in handling default `FlyteFile` values in workflows by modifying the `convert` function in the `FileParamType` class. It ensures that existing `FlyteFile` instances are returned directly without nesting, allowing local workflows to execute smoothly with `FlyteFile` as a default argument.