`juju run-action` should treat parameter value with quotation marks as string

Bug #1968346 reported by Tianqi Xiao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Hello,

I suggest adding support for treating a parameter value with quotation marks as a string when running `juju run-action`. The `--string-args` flag it has right now converts all parameter values to the type string, which causes errors if an action requires various input types for different parameters.

An example case:

To remove and purge a disk in a ceph-osd unit, one can run the following action

`juju run-action --wait ceph-osd/0 remove-disk osd-ids=1 purge=true`

osd-ids only accepts a string value, and purge only accepts a boolean value. Without using `--string-args`, the action fails because `1` is considered as an integer. With `--string-args`, the action again fails because `true` is considered as a string now.

If treating a value with quotation marks as string is supported, we no longer need to face the dilemma by simply running:

`juju run-action --wait ceph-osd/0 remove-disk osd-ids="1" purge=true`

Ian Booth (wallyworld)
tags: added: actions
Changed in juju:
milestone: none → 2.9-next
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9-next → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.