Skip to content

Conversation

@designcode
Copy link
Collaborator

@designcode designcode commented Jan 20, 2026

Note

Introduces bucket update functionality and credential-based authentication flow.

  • New updateBucket (PATCH /<bucket>) supports ACL, directory listing toggle, regions, cache-control, custom domain, and delete protection
  • shared/http-client: adds AWS SigV4 signing via @smithy/signature-v4 and @aws-crypto/sha256-js; uses credentials (accessKeyId/secretAccessKey) when no session token; improves request body handling and response parsing; updates client cache key
  • packages/storage/lib/http-client: allows either session token or access key credentials; validates organizationId when using session token
  • shared/headers: adds ACL, ACL_LIST_OBJECTS, AUTHORIZATION, and fork snapshot headers
  • Exposes updateBucket from packages/storage/src/server.ts
  • Adds new deps to @tigrisdata/storage

Written by Cursor Bugbot for commit 5d37455. This will update automatically on new commits. Configure here.

@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Added updateBucket method to enable updating bucket configurations including access control (public/private), consistency mode (strict/default), and region settings. The implementation uses a new HTTP client factory pattern with AWS Signature V4 authentication support alongside existing session token authentication.

Major changes:

  • Added updateBucket function that uses PATCH requests with custom headers and body parameters
  • Created createStorageClient factory function to centralize HTTP client creation with credential validation
  • Implemented AWS Signature V4 signing for credential-based authentication in the shared HTTP client
  • Added new header constants for ACL and authorization
  • Exported new dependencies for signature generation

Issues found:

  • Unreachable validation code in http-client.ts that should be removed (lines 25-30)

Confidence Score: 3/5

  • PR contains a logic error that needs fixing before merge
  • Score reflects unreachable code in validation logic that indicates incomplete refactoring, but core functionality appears sound
  • Pay close attention to packages/storage/src/lib/http-client.ts validation logic

Important Files Changed

Filename Overview
packages/storage/src/lib/http-client.ts added HTTP client factory with AWS credentials support, contains unreachable code in validation logic
packages/storage/src/lib/bucket/update.ts added updateBucket method with access, consistency, and region options
shared/http-client.ts added AWS Signature V4 authentication support alongside session token authentication

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


export type UpdateBucketOptions = {
access?: 'public' | 'private';
consistency?: 'strict' | 'default';
Copy link

Choose a reason for hiding this comment

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

Don't add this option. We will be deprecating this soon in favor of some new options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, I will mark also mark it as deprecated in createBucket method.

Copy link

Choose a reason for hiding this comment

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

Don't mark it deprecated right now. For that we can do it once we rollout changes on console.

import { createStorageClient } from '../http-client';
import type { TigrisStorageConfig, TigrisStorageResponse } from '../types';

export type UpdateBucketOptions = {
Copy link

Choose a reason for hiding this comment

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

There are some other options as well like object notification, object lifecycle. But we can add those incrementally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct, I guess I will add those here in this same PR.

@designcode designcode merged commit f39c6a5 into main Jan 21, 2026
2 of 3 checks passed
@designcode designcode deleted the storage/update-bucket branch January 21, 2026 12:52
@github-actions
Copy link

🎉 This PR is included in version 1.0.10 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 1.1.4 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 2.11.0 🎉

The release is available on npm package (@latest dist-tag)

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.

4 participants