The `actions` command does poor data munging

Bug #1871719 reported by Peter Matulis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Simon Richardson

Bug Description

When displaying a charm's actions with the `actions` command the text almost always comes out jagged and difficult to read. As long as the actions.yaml file contains valid YAML Juju should be able to do the right thing and display properly formatted text.

Based on

https://api.jujucharms.com/charmstore/v5/percona-cluster-285/archive/actions.yaml

Can Juju munge the text so that the output can look something like this:

https://paste.ubuntu.com/p/3TnSd4JMRz/

Instead of like this:

https://paste.ubuntu.com/p/kjptT4JcM9/

Tags: bitesize
Revision history for this message
Tim McNamara (tim-clicks) wrote : Re: [Bug 1871719] [NEW] The `actions` command does poor data munging

FWIW this would be a very difficult feature to implement, because it would
require Juju to receive intelligence about what type of output each action
expects to provide.

Seems like a great usability win though.

On Thu, 9 Apr 2020 at 10:00, Peter Matulis <email address hidden>
wrote:

> Public bug reported:
>
> When displaying a charm's actions with the `actions` command the text
> almost always comes out jagged and difficult to read. As long as the
> actions.yaml file contains valid YAML Juju should be able to do the
> right thing and display properly formatted text.
>
> Based on
>
> https://api.jujucharms.com/charmstore/v5/percona-
> cluster-285/archive/actions.yaml
>
> Can Juju munge the text so that the output can look something like this:
>
> https://paste.ubuntu.com/p/3TnSd4JMRz/
>
> Instead of like this:
>
> https://paste.ubuntu.com/p/kjptT4JcM9/
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju-bugs, juju-project-bugs
> https://bugs.launchpad.net/bugs/1871719
>
> Title:
> The `actions` command does poor data munging
>
> Status in juju:
> New
>
> Bug description:
> When displaying a charm's actions with the `actions` command the text
> almost always comes out jagged and difficult to read. As long as the
> actions.yaml file contains valid YAML Juju should be able to do the
> right thing and display properly formatted text.
>
> Based on
>
> https://api.jujucharms.com/charmstore/v5/percona-
> cluster-285/archive/actions.yaml
>
> Can Juju munge the text so that the output can look something like
> this:
>
> https://paste.ubuntu.com/p/3TnSd4JMRz/
>
> Instead of like this:
>
> https://paste.ubuntu.com/p/kjptT4JcM9/
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1871719/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=juju; status=New; importance=Undecided;
> assignee=None;
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: petermatulis
> Launchpad-Bug-Reporter: Peter Matulis (petermatulis)
> Launchpad-Bug-Modifier: Peter Matulis (petermatulis)
> Launchpad-Message-Rationale: Subscriber (juju)
> Launchpad-Message-For: tim-clicks
> Launchpad-Subscription: juju-bugs
> Launchpad-Subscription: juju-project-bugs
>

Revision history for this message
Tim McNamara (tim-clicks) wrote :

Sorry, I spoke too soon. You're referring to the list-actions command. We
could definitely optimise for readability here.

On Thu, 9 Apr 2020 at 10:06, Tim McNamara <email address hidden>
wrote:

> FWIW this would be a very difficult feature to implement, because it would
> require Juju to receive intelligence about what type of output each action
> expects to provide.
>
> Seems like a great usability win though.
>

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.8.1
importance: Undecided → High
status: New → Triaged
tags: added: bitesize
Revision history for this message
Tim Penhey (thumper) wrote :

Recommend that we instead do the following:

action-name
<8 spaces> description line one
<8 spaces> description line two, etc.
next-action
<8 spaces> description line one

Changed in juju:
assignee: nobody → Simon Richardson (simonrichardson)
status: Triaged → In Progress
Revision history for this message
Simon Richardson (simonrichardson) wrote :

This isn't exactly what is proposed by @thumper, but we get to keep tabular output even with multi-line support for descriptions.

PR here: https://github.com/juju/juju/pull/11789

Example is here: https://paste.ubuntu.com/p/PKSSsdK2kv/

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
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.