Project

Profile

Help

Issue #3304

closed

Repository Version content can be added infinite number of times

Added by dkliban@redhat.com about 6 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
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
}
Actions #1

Updated by dalley about 6 years ago

  • Sprint/Milestone set to 53
  • Triaged changed from No to Yes
Actions #2

Updated by ttereshc about 6 years ago

+1 to disallow adding the same content multiple times and not solving this issue by filtering.

Actions #3

Updated by daviddavis about 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #4

Updated by jortel@redhat.com about 6 years ago

  • Sprint/Milestone changed from 53 to 54
Actions #5

Updated by daviddavis about 6 years ago

  • Status changed from ASSIGNED to POST

Added by daviddavis about 6 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.

closes #3304 https://pulp.plan.io/issues/3304

Added by daviddavis about 6 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.

closes #3304 https://pulp.plan.io/issues/3304

Actions #6

Updated by daviddavis about 6 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 32
Actions #8

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (54)
Actions #9

Updated by dkliban@redhat.com about 6 years ago

  • Sprint/Milestone set to 3.0.0
Actions #10

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)
Actions #11

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF