[Pulp-dev] Docker plugin: Creation of a new repository version for the same tag and digest
Lubos Mjachky
lmjachky at redhat.com
Fri Aug 2 14:01:32 UTC 2019
Dear colleagues,
currently, I am working on the issue https://pulp.plan.io/issues/4934 which
requests to implement a feature for tagging and untagging manifests within
the docker's plugin. One thing to comprehend is not clear for me. When a
user wants to tag a manifest with an existing name and with a same digest,
what should happen?
a) A new repository version with no new content added should be created.
b) A new repository version with the same content removed and added should
be created.
c) An error message should be returned in the response. A new repository
version is not created.
For example, in the RPM plugin, when I execute the following call (I think
it is related to this problem) two times (source:
https://pulp-rpm.readthedocs.io/en/latest/workflows/upload.html):
$ http POST :24817${REPO_HREF}versions/
add_content_units:="[\"$CONTENT_HREF\"]"
Two separate repository versions are created. The first repository version
contains the new rpm package in the "added" field:
{
"_created": "2019-08-02T12:55:46.357836Z",
"_href":
"/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/3/",
"base_version": null,
"content_summary": {
"added": {
"rpm.package": {
"count": 1,
"href":
"/pulp/api/v3/content/rpm/packages/?repository_version_added=/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/3/"
}
},
"present": {
...
},
"removed": {}
},
"number": 3
}
However, the second repository version has got the empty "added" field:
{
"_created": "2019-08-02T12:56:14.214961Z",
"_href":
"/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/4/",
"base_version": null,
"content_summary": {
"added": {},
"present": {
...
},
"removed": {}
},
"number": 4
}
* The field "present" contains the same content in each repository version,
therefore, I have not included it in the snippet.
Thank you in advance,
LM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20190802/c71aeae3/attachment.htm>
More information about the Pulp-dev
mailing list