Actions
Issue #3304
closedRepository Version content can be added infinite number of times
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 32
Quarter:
Description
Both the repository version API and the repository version content API report that the same unit is in a repository version twice.
(pulp) [vagrant@pulp3 pulp]$ http GET $REPO_HREF'versions/4/content/'
HTTP/1.0 200 OK
Allow: GET, HEAD, OPTIONS
Content-Length: 990
Content-Type: application/json
Date: Fri, 19 Jan 2018 14:06:24 GMT
Server: WSGIServer/0.2 CPython/3.6.3
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"next": null,
"previous": null,
"results": [
{
"_href": "http://localhost:8000/api/v3/content/file/2decf959-c6c0-4384-91d5-e8d8fe76a7c0/",
"artifacts": {
"test.iso": "http://localhost:8000/api/v3/artifacts/133e0e7e-903e-4349-94aa-2ca9c0221b54/"
},
"digest": "582f1729b0c15eacbb7d02a553c0a96a39f817135c15ac4190aef96e45c4b65d",
"notes": {},
"path": "test.iso",
"type": "file"
},
{
"_href": "http://localhost:8000/api/v3/content/file/b2970189-ccff-46aa-89ca-6bebc2e70a18/",
"artifacts": {
"test2.iso": "http://localhost:8000/api/v3/artifacts/b9b7380b-a303-4e2d-a748-0e874ea89275/"
},
"digest": "042c259d546331588e1dff83a46f62a27fb7cf3de4050924470d99fd8d2a046f",
"notes": {},
"path": "test2.iso",
"type": "file"
},
{
"_href": "http://localhost:8000/api/v3/content/file/f179c296-129e-4e14-bf58-519162b59d77/",
"artifacts": {
"test3.iso": "http://localhost:8000/api/v3/artifacts/677dd1fc-f3db-41c6-900c-0a770e08f0a5/"
},
"digest": "f56e08898287e60b3169392351e9296bbe28417db1f8e34e8058d124be89b93a",
"notes": {},
"path": "test3.iso",
"type": "file"
}
]
}
(pulp) [vagrant@pulp3 pulp]$ http GET $REPO_HREF'versions/5/content/'
HTTP/1.0 200 OK
Allow: GET, HEAD, OPTIONS
Content-Length: 1307
Content-Type: application/json
Date: Fri, 19 Jan 2018 14:06:29 GMT
Server: WSGIServer/0.2 CPython/3.6.3
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"next": null,
"previous": null,
"results": [
{
"_href": "http://localhost:8000/api/v3/content/file/2decf959-c6c0-4384-91d5-e8d8fe76a7c0/",
"artifacts": {
"test.iso": "http://localhost:8000/api/v3/artifacts/133e0e7e-903e-4349-94aa-2ca9c0221b54/"
},
"digest": "582f1729b0c15eacbb7d02a553c0a96a39f817135c15ac4190aef96e45c4b65d",
"notes": {},
"path": "test.iso",
"type": "file"
},
{
"_href": "http://localhost:8000/api/v3/content/file/b2970189-ccff-46aa-89ca-6bebc2e70a18/",
"artifacts": {
"test2.iso": "http://localhost:8000/api/v3/artifacts/b9b7380b-a303-4e2d-a748-0e874ea89275/"
},
"digest": "042c259d546331588e1dff83a46f62a27fb7cf3de4050924470d99fd8d2a046f",
"notes": {},
"path": "test2.iso",
"type": "file"
},
{
"_href": "http://localhost:8000/api/v3/content/file/b2970189-ccff-46aa-89ca-6bebc2e70a18/",
"artifacts": {
"test2.iso": "http://localhost:8000/api/v3/artifacts/b9b7380b-a303-4e2d-a748-0e874ea89275/"
},
"digest": "042c259d546331588e1dff83a46f62a27fb7cf3de4050924470d99fd8d2a046f",
"notes": {},
"path": "test2.iso",
"type": "file"
},
{
"_href": "http://localhost:8000/api/v3/content/file/f179c296-129e-4e14-bf58-519162b59d77/",
"artifacts": {
"test3.iso": "http://localhost:8000/api/v3/artifacts/677dd1fc-f3db-41c6-900c-0a770e08f0a5/"
},
"digest": "f56e08898287e60b3169392351e9296bbe28417db1f8e34e8058d124be89b93a",
"notes": {},
"path": "test3.iso",
"type": "file"
}
]
}
(pulp) [vagrant@pulp3 pulp]$ http GET $REPO_HREF'versions/5/'
HTTP/1.0 200 OK
Allow: GET, DELETE, HEAD, OPTIONS
Content-Length: 545
Content-Type: application/json
Date: Fri, 19 Jan 2018 14:09:52 GMT
Server: WSGIServer/0.2 CPython/3.6.3
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"_added_href": "http://localhost:8000/api/v3/repositories/c1206a9d-b03a-4198-8c45-e6ad6ed073bb/versions/5/added_content/",
"_content_href": "http://localhost:8000/api/v3/repositories/c1206a9d-b03a-4198-8c45-e6ad6ed073bb/versions/5/content/",
"_href": "http://localhost:8000/api/v3/repositories/c1206a9d-b03a-4198-8c45-e6ad6ed073bb/versions/5/",
"_removed_href": "http://localhost:8000/api/v3/repositories/c1206a9d-b03a-4198-8c45-e6ad6ed073bb/versions/5/removed_content/",
"content_summary": {
"file": 4
},
"created": "2018-01-19T14:05:51.829350Z",
"number": 5
}
Updated by dalley almost 7 years ago
- Sprint/Milestone set to 53
- Triaged changed from No to Yes
Updated by ttereshc almost 7 years ago
+1 to disallow adding the same content multiple times and not solving this issue by filtering.
Updated by daviddavis almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by jortel@redhat.com almost 7 years ago
- Sprint/Milestone changed from 53 to 54
Updated by daviddavis almost 7 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis almost 7 years ago
Added by daviddavis almost 7 years ago
Revision f4ebdf79 | View on GitHub
Prevent duplicate content
Prevent users/plugins from adding content to a repo version if that content would otherwise already exist for that repo version.
Updated by daviddavis almost 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|f4ebdf791999bdb48e81adda60e9d76c07c00c51.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Prevent duplicate content
Prevent users/plugins from adding content to a repo version if that content would otherwise already exist for that repo version.
closes #3304 https://pulp.plan.io/issues/3304