canonical / canonical/hydra-operator
Allow commas in `metadata` field of `create-oauth-client` action
- Dominant language
- Python
- Stars
- 9
- Forks
- 9
- Avg merge
- 10h 11m
- Merged PRs (30d)
- 22
Description
### Enhancement Proposal
Currently when issuing a `create-oauth-client` action with the following metadata `metadata="department='Test Department',description='Test department for sales, service, marketing, and commerce'" ` containing commas it fails:
```bash
juju run hydra/leader create-oauth-client \
[...]
metadata="department='Test Department',description='Test department for sales, service, marketing, and commerce'"
Running operation 248 with 1 task
- task 249 on unit-hydra-1
Waiting for task 249...
Action id 249 failed: exit status 1
Uncaught ValidationError in charm code: 1 validation error for OAuthClient
metadata
Value error, not enough values to unpack (expected 2, got 1) [type=value_error, input_value="department='Test Department',description='Test department for sales,
service, marketing, and commerce'", input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/value_error
Use `juju debug-log` to see the full traceback.
ERROR the following task failed:
- id "249" with return code 1
```
If I remove the commas, it works properly.
The request is that metadata supports commas as it's a common and necessary punctuation in descriptions.
Contributor guide
Research direction
Start by reproducing the create-oauth-client action with the metadata value shown and trace how it is parsed before OAuthClient validation. Done means metadata descriptions containing commas are accepted while the existing department and description format continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100