Skip to content

Fix not found error for md5#6037

Merged
rtibbles merged 1 commit into
learningequality:hotfixesfrom
rtibbles:fix/resumable-md5-missing-object
Jul 11, 2026
Merged

Fix not found error for md5#6037
rtibbles merged 1 commit into
learningequality:hotfixesfrom
rtibbles:fix/resumable-md5-missing-object

Conversation

@rtibbles

Copy link
Copy Markdown
Member

Summary

Fixes FileNotFoundError when trying to get the md5 for a file that doesn't exist in GCS

References

Clean up from #5995

AI usage

Had Claude quickly trace this from the log output in hotfixes

…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_019ineqU2EGLAcWW2WPWR3mE
@rtibbles rtibbles merged commit 07b4f58 into learningequality:hotfixes Jul 11, 2026
20 checks passed
@rtibbles rtibbles deleted the fix/resumable-md5-missing-object branch July 11, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant