Commit 7366349
fix: return None from CompositeGCS.get_stored_object_md5 for missing objects
The resumable upload_url path calls get_stored_object_md5(filepath) to dedup
against a stored object's md5. On CompositeGCS this delegated to
_get_readable_backend(name), which raises FileNotFoundError when the object is
in no backend -- i.e. every not-yet-uploaded file -- 500ing upload_url for all
new resumable uploads. Catch FileNotFoundError and return None, matching
GoogleCloudStorage.get_stored_object_md5 for a missing blob.
Add regression tests for the found and not-found cases; the not-found test
fails against the pre-fix code (FileNotFoundError).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ineqU2EGLAcWW2WPWR3mE1 parent a01bd10 commit 7366349
2 files changed
Lines changed: 27 additions & 1 deletion
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
0 commit comments