Add file_extension fields to BlobType#3406
Draft
ddl-rliu wants to merge 5 commits intoflyteorg:masterfrom
Draft
Conversation
3 tasks
ddl-rliu
commented
Mar 12, 2026
ddl-rliu
commented
Mar 12, 2026
2 tasks
caaa6f8 to
8ec4ae4
Compare
This was referenced Mar 25, 2026
ddl-rliu
commented
Apr 9, 2026
pyproject.toml
Outdated
| "docker>=4.0.0", | ||
| "docstring-parser>=0.9.0", | ||
| "flyteidl>=1.16.1,<2.0.0a0", | ||
| "flyteidl @ git+https://github.com/ddl-rliu/flyte.git@1ba7c1545198a2820348323e64c23a41a19e7a7d#subdirectory=flyteidl", |
Contributor
Author
There was a problem hiding this comment.
Bump this after flyteorg/flyte#7009 merges
ddl-rliu
commented
Apr 9, 2026
| return None | ||
|
|
||
|
|
||
| class FileExtension: |
Contributor
Author
There was a problem hiding this comment.
Follows same pattern as BatchSize:
flytekit/flytekit/core/type_engine.py
Line 75 in 71194a4
52b0c79 to
ce58c01
Compare
Port new BlobType fields file_extension and enable_legacy_filename to flytekit.
FlyteFile inputs can be annotated with the FileDownloadConfig annotation to
configure the file extension to use during the copilot download phase.
e.g.
```python
def t1(file: Annotated[FlyteFile, FileDownloadConfig(file_extension="csv")]):
... # copilot downloads the file to e.g. /inputs/file.csv
versus...
def t1(file: FlyteFile["csv"]):
... # copilot downloads the file to e.g. /inputs/file
```
Signed-off-by: ddl-rliu <richard.liu@dominodatalab.com>
Signed-off-by: ddl-rliu <richard.liu@dominodatalab.com>
Signed-off-by: ddl-rliu <richard.liu@dominodatalab.com>
Signed-off-by: ddl-rliu <richard.liu@dominodatalab.com>
ce58c01 to
3edf6e4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3406 +/- ##
==========================================
- Coverage 45.78% 39.44% -6.34%
==========================================
Files 317 216 -101
Lines 28359 22873 -5486
Branches 3015 3021 +6
==========================================
- Hits 12983 9022 -3961
+ Misses 15278 13755 -1523
+ Partials 98 96 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
See flyteorg/flyte#7009
Tracking issue
Closes flyteorg/flyte#7024 [BUG] [copilot] File extensions are missing when copilot downloads Blob/FlyteFile inputs
Why are the changes needed?
(Keeping this PR in draft until flyteorg/flyte#7009 is merged)
After flyteorg/flyte#7009 merges, adding the new file_extension field to BlobType, this flytekit PR will enable users to configure the file extension on FlyteFile inputs. This addresses the issue where file extensions are missing when copilot downloads Blob/FlyteFile inputs.
What changes were proposed in this pull request?
Add the file_extension field to BlobType. Add annotation "FileExtension", which is used to annotate a FlyteFile when we want to download the file with a specific extension. For example,
Under the hood, this sets
file_extensionin BlobType.How was this patch tested?
Setup process
Ran a workflow locally to test the changes
Screenshots
Check all the applicable boxes
Related PRs
Docs link