-
Notifications
You must be signed in to change notification settings - Fork 45
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 support for pushing manifest lists to the registry #597
Conversation
f931df5
to
ade04c8
Compare
9ebed5f
to
79aca70
Compare
bfe6c23
to
ac4dd01
Compare
pulp_container/app/registry_api.py
Outdated
if has_task_completed(dispatched_task): | ||
return ManifestResponse(manifest, path, request, status=201) | ||
|
||
def _save_manifest(self, artifact, manifest_digest, request, config_blob=None): |
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.
nice :)
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.
I'd place request in front of artifact
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.
actually you're using only content_type, no need to pass whole request object - request.content_type would do.
blobs.add(digest) | ||
raise BlobInvalid(digest=config_digest) | ||
|
||
try: |
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.
why this is needed? you can just use the repository object directly from line 843
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.
Maybe, the try-except block is redundant and it can be simply rewritten as version = distribution.repository_version or repository.latest_version()
.
I wanted to get a repository version from the distribution since the distribution may point to a non-latest repository version.
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.
can you just use repository object from line 843 and do repository.latest_version()?
ac4dd01
to
e9567d0
Compare
e774eb7
to
ee22aa1
Compare
ee22aa1
to
76b45be
Compare
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.
please update this line https://github.com/pulp/pulp_container/pull/597/files#diff-1b944e15118f82233aa03a435e9e05c188ad0d371b71be43260506b4a5eeddffR910 to:
version = repository.latest_version()
since you are pushing to content, it will always be into a push-repo-type where distribution will always point to a repository and not repo version.
76b45be
to
1843a04
Compare
Done. |
closes #469