Skip to content

feat: delegate upload_parquet to SDK upload_file; classify 501 as terminal (0.7.3) - #48

Merged
eddietejeda merged 1 commit into
mainfrom
fix/501-terminal-and-sdk-upload-delegation
Jul 16, 2026
Merged

feat: delegate upload_parquet to SDK upload_file; classify 501 as terminal (0.7.3)#48
eddietejeda merged 1 commit into
mainfrom
fix/501-terminal-and-sdk-upload-delegation

Conversation

@eddietejeda

@eddietejeda eddietejeda commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Items 1 and 5 from the 0.7.2 code review (patches 2–4 subsumed by 5; no fallback or 501 special-casing — presigned uploads are always available on the server).

Changes

  • upload_parquet() is now a thin delegation to hotdata.uploads.UploadsApi.upload_file() (the enriched wrapper — the framework previously imported the bare generated class). Gains: concurrent part PUTs under a peak-memory budget, per-part retries, ETag/size validation, and substantially faster large uploads. Deletes the hand-rolled session→PUT→finalize flow, which also retires the review's ETag-KeyError, stale-Content-Length, and missing-size-check findings.
  • classify_sdk_error: 501 → terminal (was transient via the 5xx bucket, burning retries on a permanent capability gap).
  • UploadError chains re-raise with the underlying ApiException as the direct cause, so retry classification keeps seeing status codes.

Validation

  • 79 unit tests pass (upload tests rewritten for the delegation; new classify test).
  • Verified live end-to-end: large multipart upload, bounded memory, exact row count after load.

@eddietejeda
eddietejeda enabled auto-merge (squash) July 16, 2026 05:20
…minal (0.7.3)

upload_parquet now uses hotdata.uploads.UploadsApi.upload_file (the
enriched wrapper, not the generated class): concurrent part PUTs under a
peak-memory budget, per-part retries, and ETag/size validation — large
uploads are substantially faster than the old sequential loop. Errors
re-raise with the underlying ApiException as direct cause so retry
classification keeps seeing status codes — and 501 is now terminal
there, not transient.
@eddietejeda
eddietejeda force-pushed the fix/501-terminal-and-sdk-upload-delegation branch from bd61d0a to eed20a6 Compare July 16, 2026 05:23

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean delegation to the SDK upload orchestration. 501-terminal classification is correctly ordered before the 5xx-transient bucket, removed imports leave no dangling references, and the ApiException cause-chain preservation is covered by tests.

@eddietejeda
eddietejeda merged commit 268c9e2 into main Jul 16, 2026
4 checks passed
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