feat(adapter): ✨ add S3 storage adapter (experimental)#38
Merged
Conversation
Implement internal S3 adapter supporting AWS S3, MinIO, LocalStack, and R2. Uses AWS SDK v2 with injected client for testability. Features: - Full Store interface implementation - True byte-range reads (ReadRange, ReaderAt) - Immutability enforcement (ErrPathExists on overwrite) - Path validation and prefix support - Client configuration helpers for S3-compatible backends - Docker Compose for LocalStack/MinIO integration testing Test gates: - Unit tests: go test ./internal/s3/... - Integration tests: LODE_S3_TESTS=1 go test -tags=integration ./internal/s3/... Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use If-None-Match: "*" conditional write to enforce immutability atomically, avoiding check-then-write race condition - Map PreconditionFailed to ErrPathExists - Return empty slice immediately for ReadRange with length=0, avoiding invalid range header - Add unit tests for zero-length ReadRange behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contract requires ErrNotFound for missing paths regardless of length. Zero-length reads now perform HeadObject existence check before returning empty slice. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clarify that consistency guarantees are backend-dependent (AWS S3 vs MinIO/LocalStack/R2 may differ) - Pin LocalStack to 4.0.3 and MinIO to RELEASE.2024-11-07 for reproducible integration tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- LocalStack: 4.0.3 → 4.3.0 - MinIO: RELEASE.2024-11-07 → RELEASE.2025-10-15T17-29-55Z (last official Docker Hub release before discontinuation) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Implement internal S3 adapter supporting AWS S3, MinIO, LocalStack, and R2. Uses AWS SDK v2 with injected client for testability.
Features:
Test gates: