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

[BUG] Local FlyteFile whose name contains spaces fail in remote execution with "File Not Found" error #5445

Closed
2 tasks done
redartera opened this issue Jun 3, 2024 · 0 comments · Fixed by flyteorg/flytekit#2478
Labels
bug Something isn't working flytekit FlyteKit Python related issue good first issue Good for newcomers

Comments

@redartera
Copy link

Describe the bug

When a user runs a workflow with pyflyte run --remote ... where one of the input arguments is a FlyteFile whose name contains space characters, the remote execution fails due to a mis-replacement of the space character.

Expected behavior

The remote execution should succeed and the remote file's path should be consistent with what the expect expects.
What's happening under the hood is that the Flyte task receives the following path:

s3://my-s3-bucket/flytesnacks/development/FQZXUDEAXUJMXMBR25T5GUJEEQ======/foo%20bar

Whereas the actual file exists under the following (spaces are compatible with S3 paths)

"s3://my-s3-bucket/flytesnacks/development/FQZXUDEAXUJMXMBR25T5GUJEEQ======/foo bar"

Additional context to reproduce

Here is an example workflow

### ./get_file.py
import flytekit
from flytekit.types.file import FlyteFile


@flytekit.task
def get_file(f: FlyteFile) -> FlyteFile:
    return FlyteFile(f.download())

@flytekit.workflow
def wf(f: FlyteFile) -> FlyteFile:
    return get_file(f=f)

Step 1 - Stand up a flyte sandbox with flytectl demo start
Step 2 - Create a local file whose name contains a space with dd if=/dev/urandom of="foo bar" bs=1048576 count=5
Step 3 - Run pyflyte run --remote get_file.py wf --f "foo bar"

Screenshots

Screenshot 2024-06-03 at 10 29 58 AM
Screenshot 2024-06-03 at 10 33 25 AM

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@redartera redartera added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jun 3, 2024
@eapolinario eapolinario added good first issue Good for newcomers flytekit FlyteKit Python related issue and removed untriaged This issues has not yet been looked at by the Maintainers labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants