Repository navigation
Align cluster tools with nested S3 storage access - #33
Merged
Merged
Conversation
Comment on lines
+505
to
+507
| ...(s3StorageAccess === undefined | ||
| ? {} | ||
| : { s3_storage_access: s3StorageAccessRequestBody(s3StorageAccess) }), |
There was a problem hiding this comment.
Comment on lines
+17
to
+19
| export const s3StorageInput = z.strictObject({ | ||
| data: s3StorageDestinationInput.describe('Destination for table data.'), | ||
| backups: s3StorageDestinationInput.describe('Destination for backups.'), |
There was a problem hiding this comment.
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.
Cluster tools now accept optional
s3StorageAccesscontainingexternalIdandresourceTag, separate froms3Storage. The API owns default generation and persistence. MCP forwards only supplied overrides and returns the API's nesteds3_storage_accessresponse.Custom cluster storage requires an External ID matching the IAM trust policy. Pre-creation verification accepts it under the same access object and saves nothing. Database creation/verification sends only
s3_storageand reuses the cluster's saved identity. Strict schemas reject top-level identity fields, flat storage fields, and database overrides. Region selection and routing from current main are preserved across discovery, verification, and creation.Tool input example
create-cluster(replica count and sizes must come fromlist-cluster-sizes):{ "organization": "acme", "name": "production", "replicas": 2, "minimumSize": { "cpuCores": 2, "memoryGiB": 8 }, "maximumSize": { "cpuCores": 2, "memoryGiB": 8 }, "s3StorageAccess": { "externalId": "rawtree-5b71c457-7d83-474b-9db9-6dc48a1ec042", "resourceTag": "rawtree-dc1fb78e-341d-48f8-a183-9ecea12eb41d" }, "s3Storage": { "data": { "bucket": "acme-data" }, "backups": { "bucket": "acme-backups" }, "roleArn": "arn:aws:iam::123456789012:role/RawTreeS3" } }Omit
s3StorageAccessands3Storagefor managed storage with API-generated identity. For custom storage, first callverify-cluster-s3-accesswith the same organization/region,s3StorageAccess.externalId, ands3Storage.The API receives this storage portion of the creation body:
{ "s3_storage_access": { "external_id": "rawtree-5b71c457-7d83-474b-9db9-6dc48a1ec042", "resource_tag": "rawtree-dc1fb78e-341d-48f8-a183-9ecea12eb41d" }, "s3_storage": { "data": { "bucket": "acme-data", "path": "" }, "backups": { "bucket": "acme-backups", "path": "" }, "role_arn": "arn:aws:iam::123456789012:role/RawTreeS3" } }Relevant managed-storage response fields:
{ "s3_storage_access": { "external_id": "rawtree-5b71c457-7d83-474b-9db9-6dc48a1ec042", "resource_tag": "rawtree-dc1fb78e-341d-48f8-a183-9ecea12eb41d" }, "s3_storage": null }Compatibility and validation
Breaking contract coordinated with Platform #1482 and CLI #59. Existing tool names are unchanged. No client-side identity generation, release/version bump, is included. Platform #1482 pins this commit in its hosted MCP adapter.
pnpm test: 229 tests passed, including actual in-memory MCP transport, nested input serialization, API-default/error forwarding, strict legacy-input rejection, and region routing.autoreview --mode commit --commit <snapshot-parented-to-main> --max-priority P3.autoreview --mode local --max-priority P3with thermo-nuclear criteria passed. Nested missing/null/unknown destination fields are rejected before HTTP; omitted paths serialize to the bucket root.