feat: Add S3 package pool storage backend#1607
Open
mmxxixx wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1607 +/- ##
==========================================
- Coverage 77.37% 76.90% -0.48%
==========================================
Files 165 166 +1
Lines 15747 16002 +255
==========================================
+ Hits 12185 12307 +122
- Misses 2356 2468 +112
- Partials 1206 1227 +21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Partially addresses #843
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Description of the Change
Adds S3 as a
packagePoolStoragebackend, so the package pool can live in anS3 bucket (or any S3-compatible store such as MinIO) instead of on local disk.
This implements the pool half of #843, following the suggestion in that issue.
The implementation follows
azure/package_pool.goclosely: same content-addressedpool path scheme, same checksum storage flow, and it reuses the existing
S3PublishRootconfig struct and the aws-sdk-go-v2 dependency already used forS3 publishing.
needed) and cover import/dedup, verify, open, remove, prefixed pools, and
both checksum cache levels.
PackagePoolStoragemarshaling was reworked into per-type wrappers: embeddingS3PublishRootalongsideAzureEndpointin the previous shared wrapper wouldsilently drop the colliding
prefix/endpointJSON tags (and panic inyaml.v3).
S3RepoTestmirrorsAzureRepoTest(t09_repo) and skipscleanly when AWS credentials are not present. It has been verified against
real AWS S3, as has the full flow end-to-end (repo add, dedup, publish,
mirror update, db cleanup, apt client install).
debian/aptly.confand the man page.Checklist
AUTHORS