Add file_extension, enable_legacy_filename fields to BlobType#3412
Closed
ddl-rliu wants to merge 5 commits intoflyteorg:masterfrom
Closed
Add file_extension, enable_legacy_filename fields to BlobType#3412ddl-rliu wants to merge 5 commits intoflyteorg:masterfrom
ddl-rliu wants to merge 5 commits intoflyteorg:masterfrom
Conversation
* Adds ImageSpec.with_runtime_packages (flyteorg#3231) * Adds ImageSpec.with_dev_dependencies Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Fix Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Add tests for noop builder Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Use runtime_packages Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Add docs abount how to use runtime packages Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Less diffs Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Fix formatting Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Fix docstring Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Dix docstring Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Let pip default to user by itself to be more compatible Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> --------- Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> * Image spec builder options (flyteorg#3233) * Image spec builder options Provide the ability to specify image `builder` specific options per Image Spec. Signed-off-by: Mike Hotan <mike@union.ai> * Add builder_options validation Signed-off-by: Mike Hotan <mike@union.ai> * updates Signed-off-by: Mike Hotan <mike@union.ai> --------- Signed-off-by: Mike Hotan <mike@union.ai> --------- Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com> Signed-off-by: Mike Hotan <mike@union.ai> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
- This is necessary due to another pending PR to upstream flytekit: flyteorg#2428 In case this PR is not likely to be merged, we have a plan to move away from this change, see the linked Doc in DOM-57472
Signed-off-by: ddl-rliu <richard.liu@dominodatalab.com>
## Why are the changes needed? `bytes` is more flexible. This flexibility is relevant when including the serialized input bindings (bytes) in the version hash calculations. This is necessary to fix a bug that can occur: There is a bug where Flyte rejects a valid workflow. This can happen when workflow inputs are read from a file, causing the workflow input bindings to be updated, without an update to the version. ## What changes were proposed in this pull request? Refactor version_hash_additional_context, which currently uses `str`, to use `bytes`
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
```
Contributor
Author
|
Closing in favor of #3406 |
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.
Upstream #3406
Tracking issue
Closes flyteorg/flyte#7024
Why are the changes needed?
What changes were proposed in this pull request?
Add file_extension, enable_legacy_filename fields to BlobType. Add annotation "FileDownloadConfig".
The annotation "FileDownloadConfig" 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_extension, enable_legacy_filenamein BlobType, and depends on flyteorg/flyte#7009How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link