feat(cli): support lakehouse upsert endpoint#5
Merged
francoischalifour merged 8 commits intoJun 30, 2026
Merged
Conversation
Contributor
Author
|
@francoischalifour this applies your decision from #3: |
Contributor
Author
|
@francoischalifour could you review this when you have a slot? It is still waiting after 72h, CI is green, and the only touched file is |
Contributor
Author
|
@francoischalifour updated this to the real latest spec tag ( |
When --format is omitted, send Lakehouse upload bodies as streams so Bun does not infer Content-Type from the local filename. Keep explicit format hints mapped to request contentType and cover both paths in the Lakehouse transport tests.
francoischalifour
approved these changes
Jun 30, 2026
Keep the Lakehouse upload content-type regression test focused on the request contract. Progress-enabled environments can wrap upload bodies as streams, so the test should not require the explicit-format body to remain a Blob.
Run the catalogs list database request before the connections request so shell integration logs and table output preserve the documented database-first order. Update operation metadata to reflect the local sequencing wrapper around the two management HTTP calls.
Remove the now-unused allPlan wrapper after catalog listing moved to explicit sequential execution. The allEffects primitive remains because parallel operation effects are still part of the interpreter and test coverage.
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
specs/tree to matchaltertable-client-specsv0.12.0, including the newrest/SPEC.mdfile./upload+/upsertsplit:uploadnow sends onlycreate/append/overwritemodes to/upload, while the newupsertcommand sendsprimary_keyto/upsert.--formatas an optional file-format hint that setsContent-Type; it is no longer sent as a Lakehouse query parameter.Fixes #3.
Impact analysis
altertable uploadquery parameters change to match the latest spec, andaltertable upsertis added for primary-key upserts.upload --mode upsertusage must move toupsert --primary-key ...under the v0.12.0 API contract.specs/rest/SPEC.mdis vendored because it is part of the latest spec tag and documents the already-existing CLI management API surface.Verification
cd cli && bun test ./tests/lakehouse.test.ts ./tests/commands-lakehouse.test.ts ./tests/operation-catalog.test.ts ./tests/completion-spec.test.tscd cli && bun run typecheckcd cli && bun run format:checkgit diff --checkKnown base-branch test state
cd cli && bun teststill fails in the existing active-context/completion output-capture tests on this branch. The focused Lakehouse/spec-related tests above pass.