Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): output normalization #2475

Merged
merged 6 commits into from
May 5, 2023
Merged

Conversation

xoscar
Copy link
Collaborator

@xoscar xoscar commented May 2, 2023

This PR normalizes the output for all of the resources

Changes

  • Implements formatter interfaces for each resource
  • Adds messaging for custom information depending on the resource/verb

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

https://www.loom.com/share/03f9b2a2115e4c589f3e4cbd50fc33e9

@xoscar xoscar added the CLI label May 2, 2023
@xoscar xoscar self-assigned this May 2, 2023
@xoscar xoscar marked this pull request as ready for review May 2, 2023 21:33
@adnanrahic
Copy link
Contributor

This is awesome! 🔥

One thing that I would prefer is to have the default get output be yaml. And, give me the option to say -o json.
The pretty output for get is redundant if we have the list verb, IMHO. What does the rest of the team think?

The rest is amazing. Very nice.

@xoscar
Copy link
Collaborator Author

xoscar commented May 3, 2023

Here's the list of currently supported resources and the pretty (table) version for each of them

Data Store

Screenshot 2023-05-03 at 9 12 31

Environment

Screenshot 2023-05-03 at 9 13 15

Config

Screenshot 2023-05-03 at 9 13 49

Demo

Screenshot 2023-05-03 at 9 15 03

Polling profile

Screenshot 2023-05-03 at 9 15 42

@xoscar xoscar requested a review from kdhamric May 3, 2023 15:45
@xoscar
Copy link
Collaborator Author

xoscar commented May 3, 2023

Copy link
Member

@mathnogueira mathnogueira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Videos really help understanding the changes

@kdhamric
Copy link
Collaborator

kdhamric commented May 4, 2023

At 1:14 in https://www.loom.com/share/097f9ffaa93c418ba86a0f7d2c75391a you do a:
tracetest list demo -o yaml
I would expect this to be the two yaml definitions separated by a '---', and would not expect the 'count' or 'items' at the top. This would give you the ability to grab the definitions and the reapply them.

@xoscar xoscar merged commit 266a0e7 into main May 5, 2023
29 checks passed
@xoscar xoscar deleted the feat/standarized-cli-outputs-2 branch May 5, 2023 15:21
schoren pushed a commit that referenced this pull request May 9, 2023
* feat(cli): output normalization

* Updates based on feedback

* fixing unit tests

* fixing unit tests

* feature(cli): updating output to match better with specs
schoren pushed a commit that referenced this pull request Jun 5, 2023
* feat(cli): output normalization

* Updates based on feedback

* fixing unit tests

* fixing unit tests

* feature(cli): updating output to match better with specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants