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

Replace github.com/gosuri/uitable with github.com/olekukonko/tablewriter #5941

Closed
ykakarap opened this issue Jan 16, 2022 · 7 comments · Fixed by #5942
Closed

Replace github.com/gosuri/uitable with github.com/olekukonko/tablewriter #5941

ykakarap opened this issue Jan 16, 2022 · 7 comments · Fixed by #5942
Assignees
Labels
area/clusterctl Issues or PRs related to clusterctl kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Milestone

Comments

@ykakarap
Copy link
Contributor

ykakarap commented Jan 16, 2022

Detailed Description

github.com/olekukonko/tablewriter is introduced in the #5893 . This new library is more feature rich and can be used to do everything that github.com/gosuri/uitable. Therefore, it would be good to replace the later with the former so that we dont have to include two table libraries.

Anything else you would like to add:

github.com/gosuri/uitable is currently being used by the clusterctl describe cluster command.

[Miscellaneous information that will assist in solving the issue.]

/kind feature
/area clusterctl

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 16, 2022
@DiptoChakrabarty
Copy link
Member

I would like to try
/assign

@DiptoChakrabarty
Copy link
Member

@ykakarap have got everything almost ready however there is an issue in the testing part

// Creates the output table
tbl := uitable.New()
// Add row for the root object, the cluster, and recursively for all the nodes representing the cluster status.
addObjectRow("", tbl, tt.objectTree, tt.objectTree.GetRoot())
for i := range tt.expectPrefix {
g.Expect(tbl.Rows[i].Cells[0].String()).To(Equal(tt.expectPrefix[i]))

How to access specific rows and column in tablewriter like uitable , there does not seem to be method to implement line 287.

The tests can be modified to be like these here https://github.com/olekukonko/tablewriter/blob/master/table_test.go

@ykakarap
Copy link
Contributor Author

@DiptoChakrabarty Firstly, thank you for stepping up to work on this. 👍🏼
I answered your query on the PR. Take a look.

@ykakarap
Copy link
Contributor Author

/remove-kind feature

@k8s-ci-robot k8s-ci-robot removed the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2022
@fabriziopandini
Copy link
Member

/kind cleanup
/milestone v1.1
/area clusterctl
Being a cleanup, there is a chance that this will probably get merged after the release

@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Jan 17, 2022
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/clusterctl Issues or PRs related to clusterctl labels Jan 17, 2022
@fabriziopandini fabriziopandini modified the milestones: v1.1, v1.2 Feb 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 4, 2022
@ykakarap
Copy link
Contributor Author

ykakarap commented May 7, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
5 participants