Bug 1148928 - 404 should be returned when non existent repo group is provided during publish
Summary: 404 should be returned when non existent repo group is provided during publish
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: 2.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.6.0
Assignee: amacdona@redhat.com
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-02 16:28 UTC by Ina Panova
Modified: 2015-02-28 22:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:37:41 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 560 0 None None None Never

Description Ina Panova 2014-10-02 16:28:19 UTC
Description of problem:
https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/repo/groups/publish.html
From docs:

404 - if the repository group ID given does not exist.

A call report is returned instead.

Version-Release number of selected component (if applicable):
2.5.0-0.6.beta

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
call report returned

Expected results:
404 returned

Additional info:

# curl -i -H "Accept: application/json" -X POST -k -u admin:admin  -d '{"id":"dist_1", "override_config": {}}' 'https://example.com/pulp/api/v2/repo_groups/invalid_repo_group/actions/publish/'
HTTP/1.1 202 Accepted
Date: Thu, 02 Oct 2014 16:23:22 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 172
Content-Type: application/json

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/7d9f4ba8-174b-456a-8c62-3f4a89893980/", "task_id": "7d9f4ba8-174b-456a-8c62-3f4a89893980"}], "result": null, "error": null}

Comment 1 amacdona@redhat.com 2014-11-11 17:11:12 UTC
https://github.com/pulp/pulp/pull/1295

Comment 2 Chris Duryee 2014-12-23 20:53:02 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 3 Irina Gulina 2015-01-13 10:27:01 UTC
>> rpm -qa pulp-server
pulp-server-2.6.0-0.2.beta.el6.noarch

>> pulp-admin repo group list
+----------------------------------------------------------------------+
                           Repository Groups
+----------------------------------------------------------------------+

Id:           banda-group
Display Name: None
Description:  None
Repo Ids:     
Notes:        

Id:           zoo-group
Display Name: None
Description:  None
Repo Ids:     
Notes:    


>> curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"id" : "d6376583-0f2b-4d31-a967-8f93b0f96101", "overrode_config": {} }' 'https://localhost/pulp/api/v2/repo_groups/non-zoo-group/actions/publish/'
HTTP/1.1 404 Not Found
Date: Tue, 13 Jan 2015 10:24:28 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Encoding: utf-8
Content-Length: 437
Connection: close
Content-Type: application/json

{"http_request_method": "POST", "exception": null, "error_message": "Missing resource(s): repo_group=non-zoo-group", "_href": "/pulp/api/v2/repo_groups/non-zoo-group/actions/publish/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"repo_group": "non-zoo-group"}}, "description": "Missing resource(s): repo_group=non-zoo-group", "sub_errors": []}, "traceback": null, "resources": {"repo_group": "non-zoo-group"}}

Comment 4 Brian Bouterse 2015-02-28 22:37:41 UTC
Moved to https://pulp.plan.io/issues/560


Note You need to log in before you can comment on or make changes to this bug.