-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add apt2aptly, parallel package uploads #9
Merged
Merged
Conversation
This file contains 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
This adds new tool, apt2aptly, to mirror an existing apt repository in aptly. To reuse obs2aptly's core logic, that was pulled out into a shared crate, sync2aptly. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
On full runs, this can drastically reduce the runtime (which also makes testing significatly easier). Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This requires refactoring in sync2aptly to generalize the location of files, as well as backoff integration to retry on download / upload failure. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This is how our actual layout on OBS is, so it needs to be matched here. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
obs2aptly keeps its version computations, because sync2aptly is generic over URLs and files, which makes moving it harder, and other origin sources like apt2aptly can more easily obtain the versions anyway. Unfortunately, the version can't just be pre-computed while gathering the origin content; because that would result in a rather large amount of version lookups in contexts where we currently don't need to. To work around this, the version—and the function used to compute it—are stored in a OnceCell + Box<dyn Fn> pair. *Technically* the caching isn't entirely needed, but while reworking all of this code anyway, might as well also avoid the reduntant version parsing. Additionally, analyzing arch-independent packages switches from using (source package, source version) pairs to (source package, package version) pairs. This should have the equivalent effect of deduplicating the packages for each architecture without relying on the source version, which is hard to obtain from apt2aptly. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
--apt-snapshot has been replaced with --apt-snapshots, which will point to a file containing one snapshot to process per line. Already-existing snapshots will now result in skipping the entire scan process, which required some refactoring to get out a component list without also doing a full scan. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This cleans up the code a bit and improves the parallel structure. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
It's a bit clearer as to the actual purpose of the code. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This adds a new option, --publish-to, to publish to the given prefix, as well as additional options to control signing and re-publishing snapshots. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
sjoerdsimons
reviewed
Aug 1, 2023
sjoerdsimons
previously approved these changes
Aug 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@refi64 I'll leave it to you what to do with the lazyversion bits; I'm fine with keeping it for now and potentially change it later. So approving the changes overall
This is useful because the tool already knows the repo names to use. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
aptly sorts the filenames before hashing them, but the .dsc files coming from reprepro often aren't sorted. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
We already do this in the normal OBS integration for performance reasons. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
sjoerdsimons
reviewed
Aug 2, 2023
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.
No description provided.