Skip to content

Commit 4ccc4ff

Browse files
committed
fix: route Dir.from_local_sync through the obstore-aware storage.put
1 parent 5b8c038 commit 4ccc4ff

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/flyte/io/_dir.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,14 @@ async def _lazy_uploader() -> tuple[str | None, str]:
786786
output_path = str(Path(local_path).absolute())
787787
return cls(path=output_path, name=dirname, hash=dir_cache_key)
788788

789-
fs = storage.get_underlying_filesystem(path=resolved_remote_path)
790-
fs.put(local_path_str, resolved_remote_path, recursive=True)
791-
return cls(path=resolved_remote_path, name=dirname, hash=dir_cache_key)
789+
# Route through the obstore-aware storage.put (via syncify) rather than the raw fsspec
790+
# fs.put(..., recursive=True). fsspec's obstore backend calls store.put_async WITHOUT a
791+
# chunk_size, pinning every multipart part to obstore's 5 MiB default and thus a
792+
# ~48.8 GiB per-file ceiling (10,000-part S3 limit). storage.put auto-sizes the part
793+
# size to each file, so large files upload correctly. Mirrors the async from_local()
794+
# above and download_sync().
795+
output_path = syncify(storage.put)(from_path=local_path_str, to_path=resolved_remote_path, recursive=True)
796+
return cls(path=output_path, name=dirname, hash=dir_cache_key)
792797

793798
@classmethod
794799
def new_remote(cls, dir_name: Optional[str] = None, hash: Optional[str] = None) -> Dir[T]:

0 commit comments

Comments
 (0)