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 uitable with tablewriter in clusterctl describe cluster command #5942

Merged
merged 1 commit into from
May 10, 2022

Conversation

DiptoChakrabarty
Copy link
Member

What this PR does / why we need it:
github.com/olekukonko/tablewriter is added in PR #5893 so it used to replace github.com/gosuri/uitable in clusterctl describe command. Tests have been changed to accommodate for the same

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #5941

Have bit of an issue with my system would like to use GitHub tests

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 16, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @DiptoChakrabarty. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 16, 2022
@ykakarap
Copy link
Contributor

/cc

@k8s-ci-robot k8s-ci-robot requested a review from ykakarap January 17, 2022 06:45
Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

@DiptoChakrabarty Thank you for taking up this 🙂

This is a first pass review. I will take another look after these comments are addresses.

Feel free to reach out if you need further clarification on anything.

cmd/clusterctl/cmd/describe_cluster.go Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
@ykakarap
Copy link
Contributor

/hold till #5893 is merged.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2022
@ykakarap
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 17, 2022
@ykakarap
Copy link
Contributor

/hold cancel
#5893 is merged. The new library is now introduced and available to use.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2022
@DiptoChakrabarty
Copy link
Member Author

@ykakarap getting a few errors in testing cases checking them out.

@ykakarap
Copy link
Contributor

@ykakarap getting a few errors in testing cases checking them out.

Thanks for following up. Feel free to reach out if needed.

Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

@DiptoChakrabarty This is going in the right direction!

Besides the table formatting issue, and a few nits this looks good.

To fix some of the auto-fixable lint issue you can run make lint-fix locally.

cmd/clusterctl/cmd/describe_cluster.go Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
@DiptoChakrabarty
Copy link
Member Author

To fix some of the auto-fixable lint issue you can run make lint-fix locally.

This is modifying a lot of files should I push that?

@ykakarap
Copy link
Contributor

This is modifying a lot of files should I push that?

It should not be modifying a lot of files 🤔. Files outside of this PR should already be compliant. I am not sure what might be happening.
In anyway, you can run make lint on your branch to identify any lint problems and fix them manually.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2022
@DiptoChakrabarty
Copy link
Member Author

In anyway, you can run make lint on your branch to identify any lint problems and fix them manually.

fixed the lint issue

@ykakarap
Copy link
Contributor

ykakarap commented Mar 5, 2022

@DiptoChakrabarty Looks like the verify pipeline is failing. (You can reproduce it locally by running make verify). The problem seems to be that the go.mod and go.sum files are out of date.
Since the github.com/gosuri/uitable is no longer used the go.mod and go.sum files need to be updated. You can do it by running make generate-modules locally. This should make all the changes needed.

@DiptoChakrabarty
Copy link
Member Author

You can do it by running make generate-modules locally. This should make all the changes needed

yes worked , thank you

Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

One last nit. Everything else looks good. :)

cmd/clusterctl/cmd/describe_cluster.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

The PR is almost there. One more round of review :)

PS: Please squash all the commit into one.

cmd/clusterctl/cmd/describe_cluster.go Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
@ykakarap
Copy link
Contributor

ykakarap commented Mar 8, 2022

@DiptoChakrabarty Can you resolve the conversations that are already addressed. Makes it easier to track the progress of the PR. Thank you! :)

@DiptoChakrabarty DiptoChakrabarty force-pushed the table branch 2 times, most recently from 93d0c76 to d7a55f3 Compare March 8, 2022 10:56
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 10, 2022
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
cmd/clusterctl/cmd/describe_cluster_test.go Outdated Show resolved Hide resolved
@vincepri
Copy link
Member

vincepri commented Apr 1, 2022

/retest

What's the status of this PR?

@DiptoChakrabarty
Copy link
Member Author

What's the status of this PR?

changes requested so far have been made @vincepri

Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

/lgtm

@DiptoChakrabarty Thank you doing this and working on all the reviews. Really appreciate it. 🚀

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2022
@DiptoChakrabarty
Copy link
Member Author

Thank You for all the help @ykakarap

Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

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

/assign @sbueringer
for approval.

@sbueringer
Copy link
Member

@DiptoChakrabarty Thank you very much!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2022
@k8s-ci-robot k8s-ci-robot merged commit 27ba2e0 into kubernetes-sigs:main May 10, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.2 milestone May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace github.com/gosuri/uitable with github.com/olekukonko/tablewriter
5 participants