eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

Add terminal UI to display analyzer results

Open YoyoTT opened this issue 3 years ago β€’ 10 comments

enecccbnikegunfhjnherlnekglgvuleuueirbbvvcld Issue #, if available:

Description of changes:

Reference to Troubleshoot.sh and termui, add a terminal UI to display analyzer outputs. The UI will be automatically presented with list of analyzer outputs when executing support bundle by running command eksctl anywhere generate support-bundl -f cluster.yaml.

Testing (if applicable):

run command ./bin/eksctl anywhere generate support bundle -f cluster.yaml to invoke the support bundle generation. Once it's done, the analyzer outputs are displayed as: image (1)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

YoyoTT avatar Sep 06 '22 17:09 YoyoTT

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign vivek-koppuru after the PR has been reviewed. You can assign the PR to them by writing /assign @vivek-koppuru in a comment when ready.

The full list of commands accepted by this bot can be found 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

eks-distro-bot avatar Sep 06 '22 17:09 eks-distro-bot

Hi @YoyoTT. Thanks for your PR.

I'm waiting for a aws 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.

eks-distro-bot avatar Sep 06 '22 17:09 eks-distro-bot

Codecov Report

Merging #3265 (66ee041) into main (629d786) will decrease coverage by 0.34%. The diff coverage is 0.62%.

:exclamation: Current head 66ee041 differs from pull request most recent head 3dcc1ce. Consider uploading reports for the commit 3dcc1ce to get more accurate results

@@            Coverage Diff             @@
##             main    #3265      +/-   ##
==========================================
- Coverage   64.41%   64.07%   -0.35%     
==========================================
  Files         352      353       +1     
  Lines       27980    28135     +155     
==========================================
+ Hits        18023    18027       +4     
- Misses       8648     8799     +151     
  Partials     1309     1309              
Impacted Files Coverage Ξ”
pkg/diagnostics/analyzer_output_ui.go 0.00% <0.00%> (ΓΈ)
pkg/diagnostics/diagnostic_bundle.go 77.08% <8.33%> (-0.23%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 06 '22 17:09 codecov[bot]

/ok-to-test

danbudris avatar Sep 07 '22 19:09 danbudris

@YoyoTT could you add some information about how this PR was tested? It'd also be great to include an example of the UI

danbudris avatar Sep 07 '22 19:09 danbudris

@YoyoTT could you add some information about how this PR was tested?

Yeah, but I'm suffering from seeking a better way to test it. Once I figured it out, I'll update the above info box. Currently, I test it by running ./bin/eksctl anywhere generate support bundle -f cluster.yaml, then the table will be printed out correctly.

YoyoTT avatar Sep 07 '22 19:09 YoyoTT

@YoyoTT could you add some information about how this PR was tested?

Yeah, but I'm suffering from seeking a better way to test it. Once I figured it out, I'll update the above info box. Currently, I test it by running ./bin/eksctl anywhere generate support bundle -f cluster.yaml, then the table will be printed out correctly.

Can you take a screenshot and upload it for the pr maybe?

mitalipaygude avatar Sep 07 '22 19:09 mitalipaygude

@YoyoTT could you add some information about how this PR was tested?

Yeah, but I'm suffering from seeking a better way to test it. Once I figured it out, I'll update the above info box. Currently, I test it by running ./bin/eksctl anywhere generate support bundle -f cluster.yaml, then the table will be printed out correctly.

Can you take a screenshot and upload it for the pr maybe?

Yeah, sure!

YoyoTT avatar Sep 07 '22 19:09 YoyoTT

since we're re-purposing code from troubleshoot.sh to implement a similar UI, we need to make sure to supply an attribution in analyzer_output_ui.go.

An example of an attribution can be found here: https://github.com/aws/eks-anywhere-build-tooling/blob/main/build/lib/cherry_pick_pull.sh#L4

this outlines the original source, their license, and then the modifications that we've made.

The alternative to this is to import the necessary packages and just directly use them. The last time I tried to import TS into EKS-A there were some thorny issue with their go mod that prevented me from doing it successfully; I don't know if they've resolved that, but it would be ideal if we could just import them and call these methods directly.

danbudris avatar Sep 07 '22 20:09 danbudris

@YoyoTT: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
eks-anywhere-presubmit 3dcc1ce0e24dce4d14ce84abf415b67f4b5d9ccb link true /test eks-anywhere-presubmit
eks-anywhere-mocks-presubmits 3dcc1ce0e24dce4d14ce84abf415b67f4b5d9ccb link true /test eks-anywhere-mocks-presubmits

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

eks-distro-bot avatar Sep 08 '22 21:09 eks-distro-bot

Will be updated after offline discussion and updated here https://github.com/aws/eks-anywhere/issues/3628

mitalipaygude avatar Oct 10 '22 18:10 mitalipaygude