You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(libstore): Replace AWS SDK with curl-based S3 implementation
This commit replaces the AWS C++ SDK with a lighter curl-based approach
for S3 binary cache operations, addressing multiple issues and improving
the overall architecture.
## Key Changes
### 1. Replaced AWS SDK with aws-crt-cpp + curl
- Removed dependency on the heavy aws-cpp-sdk-s3 and aws-cpp-sdk-transfer
- Added lightweight aws-crt-cpp for credential resolution only
- Leverages curl's native AWS SigV4 authentication (requires curl >= 7.75.0)
### 2. Consolidated S3 support into HttpBinaryCacheStore
- S3BinaryCacheStore now delegates to HttpBinaryCacheStore
- Eliminates layer violation (S3 logic no longer in generic FileTransfer)
- S3 URLs are converted to HTTPS URLs with proper authentication headers
### 3. Improved S3 URL handling
- Added ParsedS3URL for structured S3 URL parsing
- Function s3ToHttpsUrl converts ParsedS3URL to ParsedURL
- Better support for custom endpoints and regions via query parameters
### 4. Fixed thread safety test
- threadSafety_MultipleProviders now actually tests concurrent access
- Spawns multiple threads accessing shared credential providers
- Tests both concurrent credential fetching and provider creation
## Benefits
- **Reduced memory usage**: Eliminates memory buffering issues that caused
segfaults with large files (>3.5GB)
- **Fixed upload reliability**: Resolves AWS SDK chunking errors
(InvalidChunkSizeError)
- **Resolved OpenSSL conflicts**: No more S2N engine override issues in
sandboxed builds
- **Lighter dependencies**: ~500 lines less code, simpler build process
- **Better architecture**: Clean separation between storage and transport layers
## Breaking Changes
- Multipart uploads are no longer supported (may be reimplemented later)
- Build now requires curl >= 7.75.0 for AWS SigV4 support
## Migration
No action required for most users. S3 URLs continue to work with the
same syntax. Users directly using S3BinaryCacheStore class should
migrate to standard HTTP binary cache stores with S3 endpoints.
Fixes: #13084, #12671, #11748, #12403, #5947
PR: #13752
Co-authored-by: John Ericson <git@johnericson.me>
0 commit comments