Skip to content

feat: add Bundle API client support#25

Merged
efirs merged 1 commit intomainfrom
feat/bundle-api
Apr 6, 2026
Merged

feat: add Bundle API client support#25
efirs merged 1 commit intomainfrom
feat/bundle-api

Conversation

@efirs
Copy link
Copy Markdown
Contributor

@efirs efirs commented Apr 3, 2026

Summary

  • Add BundleObjects method for streaming multi-object tar download via POST /{bucket}?bundle
  • SigV4-signed HTTP POST, returns io.ReadCloser for streaming tar consumption
  • WithBundleCompression / WithBundleOnError header helpers in tigrisheaders
  • Godoc example showing tar.NewReader iteration

Test plan

  • Unit tests: 6 tests covering validation, request construction, SigV4 signing, HTTP errors
  • go test ./... passes

🤖 Generated with Claude Code


Note

Medium Risk
Adds a new SigV4-signed HTTP streaming path (POST /{bucket}?bundle) outside the AWS SDK, which could affect auth/signing correctness and introduces long-lived streaming connections. Surface area is limited to a new method plus tests and an example.

Overview
Adds Client.BundleObjects, a Tigris-specific API to fetch up to thousands of object keys in one request via POST /{bucket}?bundle, returning a streaming tar io.ReadCloser with configurable compression and missing-object behavior via X-Tigris-Bundle-* headers.

Includes unit tests for input validation, request/header/body construction (including SigV4 auth header), and HTTP error handling, plus a new godoc example demonstrating iterating the returned tar stream. Updates go.mod to make github.com/joho/godotenv a direct dependency.

Reviewed by Cursor Bugbot for commit 1a89e45. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 3, 2026

Greptile Summary

Adds Client.BundleObjects, a Tigris-specific endpoint (POST /{bucket}?bundle) that returns a streaming tar archive of multiple objects in one request, with SigV4 signing, configurable compression, and error-handling modes. The implementation uses a dedicated bundleHTTPClient transport, includes solid unit tests, and a godoc example following the project's established patterns. The PR description still references WithBundleCompression/WithBundleOnError helpers in tigrisheaders, but those were not added (likely removed after prior review feedback) — the description should be updated to match.

Confidence Score: 5/5

Safe to merge; the one remaining finding is a minor best-practice suggestion that doesn't affect correctness.

All P0/P1 concerns from prior review rounds appear addressed (dedicated transport replacing http.DefaultClient, SDK pipeline helpers removed). The only new finding is a missing enforcement of the documented 5,000-key ceiling, which is P2 — the server will reject oversized requests anyway.

bundle.go — missing guard for the documented 5,000-key limit.

Important Files Changed

Filename Overview
bundle.go New file implementing BundleObjects; uses a dedicated bundleHTTPClient transport, SigV4 signing, and streaming response. Documented 5,000-key limit is not validated in code.
bundle_test.go Comprehensive unit tests covering validation, request construction, SigV4 header presence, and HTTP error handling; all look correct.
example_test.go Adds ExampleClient_BundleObjects godoc example; error handling follows the established project pattern and tar iteration is idiomatic.
go.mod Promotes godotenv from indirect to direct dependency, consistent with AGENTS.md guidance for test imports.
tigrisheaders/tigrisheaders.go Only adds a trailing newline; no functional changes. WithBundleCompression/WithBundleOnError mentioned in the PR description were not added (likely removed after prior review feedback).

Reviews (2): Last reviewed commit: "feat: add Bundle API support for streami..." | Re-trigger Greptile

Comment thread bundle.go Outdated
Comment thread tigrisheaders/tigrisheaders.go Outdated
Comment thread bundle.go Outdated
Comment thread tigrisheaders/tigrisheaders.go Outdated
@efirs efirs force-pushed the feat/bundle-api branch from 1263b20 to 7d5ee09 Compare April 3, 2026 21:46
Comment thread bundle.go Outdated
Comment thread bundle.go Outdated
@efirs efirs force-pushed the feat/bundle-api branch from 7d5ee09 to 7fe70f2 Compare April 3, 2026 22:03
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7fe70f2. Configure here.

Comment thread bundle.go
Add BundleObjects method that POSTs to /{bucket}?bundle with SigV4
signing and returns a streaming io.ReadCloser for tar consumption.

Includes WithBundleCompression/WithBundleOnError header helpers,
unit tests, and godoc example.

Assisted-by: Claude Opus 4.6 via Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yevgeniy Firsov <firsov@tigrisdata.com>
@efirs efirs force-pushed the feat/bundle-api branch from 7fe70f2 to 1a89e45 Compare April 3, 2026 22:43
@efirs
Copy link
Copy Markdown
Contributor Author

efirs commented Apr 3, 2026

@greptileai review and summarize

@efirs efirs merged commit 1a89e45 into main Apr 6, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants