Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Issue #1261
closedPublishing a repository without providing the distributor ID should fail and inform user
Description
Today while playing with the API to publish an existing synchronized YUM repository, I noticed that a new publish task was successfully created even though I failed to provide the distributor id:
POST https://localhost/pulp/api/v2/repositories/animals/actions/publish/
HTTP/1.1 202 Accepted
Connection: Keep-Alive
Content-Encoding: utf-8
Content-Length: 172
Content-Type: application/json
Date: Fri, 18 Sep 2015 20:55:30 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
{
"error": null,
"result": null,
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/2f70d70f-6002-4fdf-b43f-ad43ac9c8a8d/",
"task_id": "2f70d70f-6002-4fdf-b43f-ad43ac9c8a8d"
}
]
}
When I checked the task itself I saw that there was an error:
"Missing resource(s): distributor=None, repository=animals"
I'd argue that if a required distributor id is not provided while attempting to publish a repository, a validation error should have happened and a new task should not be created
Updated by amacdona@redhat.com about 9 years ago
- Status changed from NEW to MODIFIED
- Platform Release set to 2.7.0
This behavior was changed in the Django conversion and should be fixed in pulp >= 2.7.0
Updated by amacdona@redhat.com about 9 years ago
- Assignee set to amacdona@redhat.com
- Triaged changed from No to Yes
Updated by dkliban@redhat.com about 9 years ago
- Status changed from MODIFIED to 5
Updated by amacdona@redhat.com almost 9 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Updated by bmbouter over 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.