Project

Profile

Help

Issue #3304

Repository Version content can be added infinite number of times

Added by dkliban@redhat.com over 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 32

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
}

Associated revisions

Revision f4ebdf79 View on GitHub
Added by daviddavis over 1 year ago

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

Revision f4ebdf79 View on GitHub
Added by daviddavis over 1 year ago

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

Revision f4ebdf79 View on GitHub
Added by daviddavis over 1 year ago

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

History

#1 Updated by dalley over 1 year ago

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

#2 Updated by ttereshc over 1 year ago

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

#3 Updated by daviddavis over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#4 Updated by jortel@redhat.com over 1 year ago

  • Sprint/Milestone changed from 53 to 54

#5 Updated by daviddavis over 1 year ago

  • Status changed from ASSIGNED to POST

#6 Updated by daviddavis over 1 year ago

  • Status changed from POST to MODIFIED

#7 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 32

#8 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (54)

#9 Updated by dkliban@redhat.com over 1 year ago

  • Sprint/Milestone set to 3.0

#10 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

Please register to edit this issue

Also available in: Atom PDF