Commit 1ecb8aa
ENH: Reject zarr chunks >5 GiB and improve upload failure logging
- Add S3_MAX_SINGLE_PART_UPLOAD (5 GiB) constant and check file size
in UploadItem.from_entry() before attempting upload. S3 rejects
single-part PUTs larger than 5 GiB, and since the server mints
presigned URLs without knowing the file size, the client must guard
against this. Raises ValueError with a clear message about the
multipart upload limitation.
- Log file size alongside filepath in all upload failure paths:
_upload_zarr_file now logs at WARNING level for both HTTPError
(non-403) and generic Exception cases, making it immediately clear
from logs which file failed and how large it was.
- Include file size in _handle_failed_items_and_raise per-item error
log lines.
Motivated by #1821 where 2.6 GiB level-0 zarr chunks failed with
ConnectionAbortedError but the logs didn't show the file sizes,
making it hard to diagnose the size-related nature of the failure.
Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 <noreply@anthropic.com>1 parent a682735 commit 1ecb8aa
2 files changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
910 | 911 | | |
911 | 912 | | |
912 | 913 | | |
913 | | - | |
| 914 | + | |
914 | 915 | | |
915 | 916 | | |
916 | 917 | | |
| |||
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
979 | | - | |
| 980 | + | |
980 | 981 | | |
| 982 | + | |
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
984 | 986 | | |
985 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
986 | 993 | | |
987 | 994 | | |
988 | 995 | | |
989 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
990 | 1003 | | |
991 | 1004 | | |
992 | 1005 | | |
| |||
1081 | 1094 | | |
1082 | 1095 | | |
1083 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1084 | 1105 | | |
1085 | 1106 | | |
1086 | 1107 | | |
1087 | 1108 | | |
1088 | | - | |
| 1109 | + | |
1089 | 1110 | | |
1090 | 1111 | | |
1091 | 1112 | | |
| |||
0 commit comments