fix: migrate create_table's upload path to the presigned upload flow - #41
Merged
Conversation
runtimedb PR #952 removed the legacy POST /v1/files endpoint in favor of the presigned direct-to-storage flow (POST /v1/uploads -> PUT -> finalize). hotdata-ibis's create_table/upload_file called the now-dead endpoint via the SDK's generated UploadsApi.upload_file, breaking every write against any runtimedb deployment past that commit (confirmed on production). Switches to hotdata.uploads.UploadsApi (the SDK's own hand-written orchestration of the presigned flow: session create, storage PUT, finalize, with retries/multipart handling) instead of hand-rolling the flow here. No SDK version bump needed -- hotdata.uploads is already present across the whole >=0.7,<0.9 pin range. upload_file's return value now carries upload_id (FinalizeUploadResponse) instead of id (the old UploadResponse). Test fixtures updated to mock the three-stage presigned flow instead of the single POST /v1/files call. Verified: full offline suite (101 tests) against the updated flow, and live against production (api.hotdata.dev, where /v1/files is confirmed 404) -- examples 01, 03, 04, 05, and the vector-search example all pass end to end, including the create_database -> create_table -> query -> drop_database write/read cycle.
rohan-hotdata
requested review from
shefeek-jinnah
and removed request for
a team
July 22, 2026 04:33
3 tasks
There was a problem hiding this comment.
Clean, focused fix. The presigned-flow migration is correct: UploadError and ApiException both map onto HotdataAPIError (preserving the Ibis error-translation chain), the upload_id field rename matches FinalizeUploadResponse, and the test fixtures meaningfully exercise all three upload stages. LGTM.
The conflict resolution merging #40 dropped the blank line between the Fixed and Added sections under Unreleased.
There was a problem hiding this comment.
Migration to the presigned upload flow is correct and cleanly scoped. Verified: no missed upload["id"] call sites, new UploadError path handled alongside ApiException, and the updated tests exercise the real SDK upload_file (only HTTP endpoints mocked) so the kwarg names, model_dump return, and upload_id key are all covered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
runtimedbPR #952 removed the legacyPOST /v1/filesupload endpoint in favor of the presigned direct-to-storage flow (POST /v1/uploads→PUT→ finalize).hotdata-ibis'screate_table/upload_filewas still calling the now-dead endpoint via the SDK's generatedUploadsApi.upload_file, breaking every write against anyruntimedbdeployment past that commit — confirmed 404 on production (api.hotdata.dev).hotdata.uploads.UploadsApi, the SDK's own hand-written orchestration of the presigned flow (session create, storagePUT, finalize, with retries/multipart already built in), rather than hand-rolling it here. No new dependency, no SDK version bump needed —hotdata.uploadsis already present across the whole>=0.7,<0.9pin range.upload["id"]→upload["upload_id"](FinalizeUploadResponse's field name differs from the oldUploadResponse).Cross-repo check
hotdata-dlt-destinationonly depends onhotdata-ibisfor the read-sidedataset().ibis()bridge — its write path goes throughhotdata_framework.ManagedDatabaseCliententirely independently, so this has no surface overlap with what that repo actually uses.Verification
mock_presigned_upload_flowhelper inconftest.py) instead of the singlePOST /v1/filescall./v1/filesis confirmed 404): examples01,03(read-only, unaffected),04,05, and the vector-search example all pass end to end, including the fullcreate_database→create_table→ query →drop_databasecycle.Note
This branch and #40 (vector-search helpers) both touch
CHANGELOG.md's[Unreleased]section at the same anchor point — expect a small, easy textual conflict when the second one merges; no code overlap otherwise.Test plan
uv run pytestuv run ruff check src tests examples🤖 Generated with Claude Code