Project

Profile

Help

Issue #8954

closed

Using form data doesn't set labels

Added by daviddavis over 3 years ago. Updated about 3 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 100
Quarter:

Description

When setting pulp_labels using a request that sends form data, pulp_labels aren't getting set:

$ http --form -p b POST :/pulp/api/v3/remotes/file/file/ name=$RANDOM pulp_labels={"environment":"dev"} url='http://test'
{
    "ca_cert": null,
    "client_cert": null,
    "connect_timeout": null,
    "download_concurrency": null,
    "headers": null,
    "max_retries": null,
    "name": "11512",
    "policy": "immediate",
    "proxy_url": null,
    "pulp_created": "2021-06-23T13:08:15.205770Z",
    "pulp_href": "/pulp/api/v3/remotes/file/file/9882755c-adf5-472f-ad13-b0c9728d1eb2/",
    "pulp_labels": {},
    "pulp_last_updated": "2021-06-23T13:08:15.205796Z",
    "rate_limit": null,
    "sock_connect_timeout": null,
    "sock_read_timeout": null,
    "tls_validation": false,
    "total_timeout": null,
    "url": "http://test"
}

This works though:

http -p b POST :/pulp/api/v3/remotes/file/file/ name=$RANDOM pulp_labels:="{\"environment\":\"dev\"}" url='http://test'

Not sure what the difference is. At the very least, we should probably be raising an error if the format is incorrect.


Related issues

Related to Pulp - Backport #9058: Backport 8954 "using form data doesn't set labels" to 3.14.zCLOSED - CURRENTRELEASEdaviddavis

Actions

Also available in: Atom PDF