-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow Galaxy downloader to trust collection cache #78
Merged
felixfontein
merged 10 commits into
ansible-community:main
from
felixfontein:trust-collection-cache
May 2, 2023
Merged
Allow Galaxy downloader to trust collection cache #78
felixfontein
merged 10 commits into
ansible-community:main
from
felixfontein:trust-collection-cache
May 2, 2023
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
Merged
felixfontein
force-pushed
the
trust-collection-cache
branch
from
April 30, 2023 20:00
54b6c2e
to
945b1a9
Compare
|
…servers always using the same method.
felixfontein
force-pushed
the
trust-collection-cache
branch
from
May 1, 2023 06:22
945b1a9
to
e6cda28
Compare
This is now ready for reviewing. |
gotmax23
reviewed
May 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.
Thanks for working on this! I left you a couple comments.
gotmax23
approved these changes
May 2, 2023
@gotmax23 thanks for reviewing this! |
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.
This allows to reduce the number of requests to the Galaxy server to zero when rebuilding Ansible (or a stable/devel docsite) when all required collection artifacts are already in the cache. Also the filename for the artifact is now determined by antsibull-core, and no longer by the Galaxy server.
Right now antsibull-core doesn't trust the cache and asks the Galaxy server for the filename and the SHA256 checksum of the artifact, and only then checks whether it has a file of that name in its cache, and whether the checksum matches. This means that even if the cache has been populated by the previous
antsibull-build prepare
call a few minutes ago, it has to query the Galaxy server again to make sure it has the latest versions. Especially since Community Galaxy does not allow the content of published collections to change, it is safe (especially for development purposes) to assume that the cache is trustworthy.