cuddly-jelly-27016
05/27/2025, 4:55 PMElastic task with the multiprocessing start method set to spawn, files or directories are not being downloaded as expected. This is due to the following warning at runtime:
/opt/micromamba/envs/runtime/lib/python3.12/site-packages/flytekit/types/directory/types.py197 RuntimeWarning: coroutine 'FileAccessProvider.async_get_data' was never awaited
# self._downloader()
## What changes were proposed in this pull request?
This occurs because the _downloader reference can incorrectly point to the underlying async coroutine (async_get_data) instead of the intended sync-wrapped get_data method, especially after pickling and spawning a new process. This PR ensures that the correct synchronous function is invoked during deserialization and execution.
## How was this patch tested?
Tested the change by running an Elastic task on a remote deployment, and verified that the file/directory download now works as expected.
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
flyteorg/flytekitcuddly-jelly-27016
05/27/2025, 4:55 PMcuddly-jelly-27016
05/29/2025, 11:47 AM