Project

Profile

Help

Issue #419

Unassociation of units from non existent repo should return 404

Added by ipanova@redhat.com almost 7 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/content/associate.html#unassociating-content-units-from-a-repository

Unassociation of content units from repo that does not exist should return 404(like in case of unit association to non existant repo) and not call report with task creation.

$ curl H "Accept: application/json" -X POST -k -u admin:admin -d '{"criteria": {"type_ids": ["rpm"], "filters": {"unit": {"name": "cat"}}}}' 'https://example.com/pulp/api/v2/repositories/invalidrepo/actions/unassociate/'| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 245 100 172 100 73 110 46 0:00:01 0:00:01 -
:--:-- 110
{
"error": null,
"result": null,
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/610fff11-3076-4528-83a4-fa150ea66239/",
"task_id": "610fff11-3076-4528-83a4-fa150ea66239"
}
]
}

Compare with unit association to non existent repo:

$ curl H "Accept: application/json" -X POST -k -u admin:admin -d '{"source_repo_id": "xxx", "override_config": {}, "criteria": {"type_ids": ["rpm"], "filters": {"unit": {}}}}' 'https://example.com/pulp/api/v2/repositories/invalidrepo/actions/associate/'|python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 526 100 418 100 108 459 118 -
:--:-- --:--:-- --:--:-- 459
{
"_href": "/pulp/api/v2/repositories/invalidrepo/actions/associate/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"repo_id": "invalidrepo"
}
},
"description": "Missing resource(s): repo_id=invalidrepo",
"sub_errors": []
},
"error_message": "Missing resource(s): repo_id=invalidrepo",
"exception": null,
"http_request_method": "POST",
"http_status": 404,
"resources": {
"repo_id": "invalidrepo"
},
"traceback": null

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

+ This bug was cloned from Bugzilla Bug #1092417 +


Related issues

Blocks Pulp - Issue #420: Task failure is not raised when unit unassociation performed on non existent repoCLOSED - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by ipanova@redhat.com almost 7 years ago

Version-Release number of selected component: 2.4.0-0.10.beta

+ This comment was cloned from Bugzilla #1092417 comment 1 +

#2 Updated by bmbouter over 6 years ago

  • Related to Issue #420: Task failure is not raised when unit unassociation performed on non existent repo added

#3 Updated by bmbouter over 6 years ago

  • Related to deleted (Issue #420: Task failure is not raised when unit unassociation performed on non existent repo)

#4 Updated by bmbouter over 6 years ago

  • Blocks Issue #420: Task failure is not raised when unit unassociation performed on non existent repo added

#5 Updated by bmbouter over 6 years ago

  • Severity changed from Low to 1. Low

#6 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#7 Updated by bmbouter over 2 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#9 Updated by bmbouter over 1 year ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF