This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 470
Fixed Registry synchronization with v2 manifests #725
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 should be backported to the |
when "application/vnd.docker.distribution.manifest.v2+json", | ||
"application/vnd.docker.distribution.manifest.list.v2+json" | ||
get_tag_from_list(target["repository"]) | ||
else |
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.
Just an idea, can't we make a second case for manifest v2 schema 1 and then have the else
block log an error. By doing that we would immediately notice when manifest v2 schema 3 is released.
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.
Good idea.
LGTM, I think this should be backported to the v2 branch. |
I'll squash the commits once tests are passing. |
In the new manifest Version 2, schema 2; some fields are missing. In this case, the "tag" field is no longer available as of this version. We used that because the notification from the registry does not provide such information for now (hopefully there will be a solution for Distribution 2.4). Thus, we pulled the manifest and extracted the tag from there. The code now detects the version of the manifest schema. If it's the latest one, then we will fetch the tags of the given repo and compare them with what we've got in the database. Note that this solution could also be applied to the version 2 schema 1, but fetching the manifest is faster and less prone to possible sync errors (even though hese errors are not really important if crono is in place). Moreover, I've added a table on the README.md file describing which versions of Portus implement what. Fixes SUSE#718 Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola
added a commit
that referenced
this pull request
Feb 11, 2016
Fixed Registry synchronization with v2 manifests
Backported into |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In the new manifest Version 2, schema 2; some fields are missing. In this case,
the "tag" field is no longer available as of this version. We used that because
the notification from the registry does not provide such information for now
(hopefully there will be a solution for Distribution 2.4). Thus, we pulled the
manifest and extracted the tag from there.
The code now detects the version of the manifest schema. If it's the latest
one, then we will fetch the tags of the given repo and compare them with what
we've got in the database.
Note that this solution could also be applied to the version 2 schema 1, but
fetching the manifest is faster and less prone to possible sync errors (even
though hese errors are not really important if crono is in place).
Moreover, I've added a table on the README.md file describing which versions of
Portus implement what.
Fixes #718
Signed-off-by: Miquel Sabaté Solà [email protected]