-
Notifications
You must be signed in to change notification settings - Fork 507
upgrade tablewriter #4026
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
base: master
Are you sure you want to change the base?
upgrade tablewriter #4026
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Carlos Panato <[email protected]>
Signed-off-by: Carlos Panato <[email protected]> more fixes Signed-off-by: Carlos Panato <[email protected]> fix lints Signed-off-by: Carlos Panato <[email protected]> more fixes Signed-off-by: Carlos Panato <[email protected]> revert upgrade for now
ed5e43f
to
d130c43
Compare
/assign @xmudrii @puerco @saschagrunert @ameukam |
|
||
// Check if the next patch release is in the Previous Patch list, if yes dont read in the output | ||
if !patchReleaseInPreviousList(releaseSchedule.Next.Release, releaseSchedule.PreviousPatches) { | ||
table.Append([]string{strings.TrimSpace(releaseSchedule.Next.Release), strings.TrimSpace(releaseSchedule.Next.CherryPickDeadline), strings.TrimSpace(releaseSchedule.Next.TargetDate), ""}) | ||
_ = table.Append([]string{strings.TrimSpace(releaseSchedule.Next.Release), strings.TrimSpace(releaseSchedule.Next.CherryPickDeadline), strings.TrimSpace(releaseSchedule.Next.TargetDate), ""}) |
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.
Why do we completely ignore the error? We should at least log it so we know that there's something wrong going on, otherwise we might just not notice that we're missing some data.
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.
Same in other places where this is present
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.
it was already ignoring the error, but will add a log on that
@@ -404,14 +406,27 @@ func ListJobs(project string, lastJobs int64) error { | |||
return fmt.Errorf("failed to listing the builds: %w", err) | |||
} | |||
|
|||
table := tablewriter.NewWriter(os.Stdout) | |||
table.SetHeader([]string{"Start Time", "Finish Time", "Status", "Console Logs"}) | |||
table := tablewriter.NewTable(os.Stdout, |
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.
Can we add some function in release-utils that's going to return a table that's already configured with everything, so that we don't have to write this much code every time we want to use a table? Does that make sense at all?
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.
sg
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind cleanup
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?