feat(oss): add native Alibaba Cloud OSS storage backend #862
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.
Summary
alibabacloud-oss-go-sdk-v2SDK instead of S3-compatible modeBackground
Litestream 0.5+ uses AWS SDK Go v2, which enables chunked encoding for uploads ≥5MB. Alibaba Cloud OSS doesn't support chunked encoding via its S3-compatible mode, breaking OSS users who upgraded from 0.3.x.
Changes
New Files
oss/replica_client.go- Main OSS ReplicaClient implementationoss/replica_client_test.go- Unit testsModified Files
cmd/litestream/main.go- Add OSS config parsing and registrationcmd/litestream/replicate.go- Add OSS logginginternal/testingutil/testingutil.go- Add OSS integration test supportgo.mod,go.sum- Add Alibaba SDK dependencyCLAUDE.md,AGENTS.md,docs/ARCHITECTURE.md- Documentation updatesConfiguration
Environment Variables
LITESTREAM_OSS_ACCESS_KEY_IDLITESTREAM_OSS_ACCESS_KEY_SECRETLITESTREAM_OSS_REGIONLITESTREAM_OSS_BUCKETTest plan
go test -v ./oss/...)go build ./...)go vet,staticcheck)Closes #861
🤖 Generated with Claude Code