-
Notifications
You must be signed in to change notification settings - Fork 167
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
cli: add special table printer for stages #786
Conversation
Signed-off-by: Kent <kent.rancourt@gmail.com>
✅ Deploy Preview for docs-kargo-akuity-io canceled.
|
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #786 +/- ##
=======================================
Coverage 46.62% 46.62%
=======================================
Files 97 97
Lines 6797 6797
=======================================
Hits 3169 3169
Misses 3476 3476
Partials 152 152 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small comment
Rows: make([]metav1.TableRow, len(items)), | ||
} | ||
for i, item := range items { | ||
// This func is only ever passed Stages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this enforced somehow? If not, should we duplicate this comment at the start of the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, nothing enforces it, but the function name should hopefully be a dead giveaway.
Before:
kargo get stages --project kargo-demo NAME AGE uat 121m test 122m
After:
kargo get stages --project kargo-demo NAME CURRENT FREIGHT HEALTH AGE test b73f9d1afaca87254b64e64e5439557e86dcba79 Healthy 123m uat b73f9d1afaca87254b64e64e5439557e86dcba79 Healthy 121m
We need this if we're to have a CLI-centric quickstart. See #721
Long-term, idk about using this package for printing tables. It was nothing but pain.