Skip to content

workload get supports --watch #371

@heyjcollins

Description

@heyjcollins

Placeholder - To be completed by PM/UX

Description of problem

As a workload works it's way through a supply chain, there are many transitional states/messages that can appear to be problems when displayed statically, and we've observed many people running the get command using linux's watch to provide a more "real-time" view of the workload over time.
While using linux's watch does work relatively well, it strips out all color and emojis decreasing the effectiveness of the UX.

Proposed solution

Update tanzu apps workload get to support a new --watch flag

  • Unit interval - seconds
  • Default value = 3 seconds (same as linux watch command)
  • Accepts only positive integer
  • -w shortcut is supported
  • ????? should this flag be exclusive of --export and/or --o yaml/json ?????

Given I've targeted a TAP cluster with a workload named "foo"
When I run "tanzu apps workload get foo --watch 
Then I see the output of workload get refresh every 3 seconds

Given I've targeted a TAP cluster with a workload named "foo"
When I run "tanzu apps workload get foo --watch 10 
Then I see the output of workload get refresh every 10 seconds

Given I've targeted a TAP cluster with a workload named "foo"
When I run "tanzu apps workload get foo --watch 3m 
Then I see a helpful error message indicating an integer is expected and the unit of time is seconds

Example

help:
-w, --watch integer command refresh interval expressed in seconds (default 3)

Describe alternatives you've considered

recommend using linux's watch - but it strips out all the decoration which aid in at-a-glance evaluation of the content.

Additional context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions