Skip to content

feat(cli): support lakehouse upsert endpoint#5

Merged
francoischalifour merged 8 commits into
altertable-ai:mainfrom
albert20260301:update/lakehouse-spec-v0.11.0
Jun 30, 2026
Merged

feat(cli): support lakehouse upsert endpoint#5
francoischalifour merged 8 commits into
altertable-ai:mainfrom
albert20260301:update/lakehouse-spec-v0.11.0

Conversation

@albert20260301

@albert20260301 albert20260301 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Update the vendored specs/ tree to match altertable-client-specs v0.12.0, including the new rest/SPEC.md file.
  • Align Lakehouse upload behavior with the /upload + /upsert split: upload now sends only create/append/overwrite modes to /upload, while the new upsert command sends primary_key to /upsert.
  • Keep --format as an optional file-format hint that sets Content-Type; it is no longer sent as a Lakehouse query parameter.

Fixes #3.

Impact analysis

  • Affects the CLI Lakehouse data path only: altertable upload query parameters change to match the latest spec, and altertable upsert is added for primary-key upserts.
  • Existing upload --mode upsert usage must move to upsert --primary-key ... under the v0.12.0 API contract.
  • Management API behavior is unchanged; specs/rest/SPEC.md is 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.ts
  • cd cli && bun run typecheck
  • cd cli && bun run format:check
  • git diff --check

Known base-branch test state

  • cd cli && bun test still fails in the existing active-context/completion output-capture tests on this branch. The focused Lakehouse/spec-related tests above pass.

@albert20260301

Copy link
Copy Markdown
Contributor Author

@francoischalifour this applies your decision from #3: specs/lakehouse/SPEC.md is now aligned to altertable-client-specs v0.11.0. Local checks passed; waiting on CI.

@albert20260301

Copy link
Copy Markdown
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 specs/lakehouse/SPEC.md, which you authored; this aligns the vendored Lakehouse spec to v0.11.0 per your decision in #3.

@albert20260301 albert20260301 changed the title chore: update lakehouse specs to v0.11.0 feat(cli): support lakehouse upsert endpoint Jun 30, 2026
@albert20260301

Copy link
Copy Markdown
Contributor Author

@francoischalifour updated this to the real latest spec tag (v0.12.0) and included the CLI behavior change required by the /upload + /upsert split. CI is green; could you review when you have a slot?

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.
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.
@francoischalifour francoischalifour merged commit d6ec3b8 into altertable-ai:main Jun 30, 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.

Spec pin is unknown in workspace status

2 participants