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

cdk doctor: script for collecting diagnostics info #154

Closed
eladb opened this issue Jun 21, 2018 · 2 comments
Closed

cdk doctor: script for collecting diagnostics info #154

eladb opened this issue Jun 21, 2018 · 2 comments
Assignees
Labels
feature-request A feature should be added or improved. ops-excellence Operational Excellence p1 package/tools Related to AWS CDK Tools or CLI

Comments

@eladb
Copy link
Contributor

eladb commented Jun 21, 2018

To improve our ability to diagnose issues and bugs, we should ship a program that collects relevant diagnostics information such as:

  1. cdk logs (we should probably save them somewhere by default under the cdk directory and roll them over)
  2. List of files in cdk directory
  3. Local repository info
  4. Npm/maven/nugget/... logs
  5. Platform/OS
  6. aws cli version
  7. Node/java versions
  8. Run with JSII_DEBUG

Sensitive Information

This bundle must not contain sensitive user information, and any potentially sensitive info should be called out (even then name of the user might be considered sensitive).

@RomainMuller
Copy link
Contributor

I propose to extend this further into cdk doctor, a command that would, by default, look at your environment & configuration, and check for anything looking like it may cause you problems and provide information on the location of interesting files, for example:

  • Is the CDK "correctly" installed (versions of all packages match)
    • Are the docs installed and available?
  • Can we obtain a default AWS client (valid credentials can be found, a default region is found)
  • Is there any environment variable set that is known to interfere?
  • What cdk.json files are used in the current context, and do they contain suspicious content?
  • Path to log files that could be useful for troubleshooting
  • Check for known issues & common pitfalls when possible

Then this could have a cdk doctor --report would collect this information and the relevant log files (default-include those that are known to NOT include sensitive information, and provide --include and --exclude flags to allow opting in or out of bundling a particular artifact) in a .tgz file before offering to file a GitHub issue with that data.

RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
@eladb
Copy link
Contributor Author

eladb commented Jun 27, 2018

Sounds great!

RomainMuller added a commit that referenced this issue Jul 3, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jul 3, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
@eladb eladb changed the title Script for collecting diagnostics info cdk doctor: script for collecting diagnostics info Jul 10, 2018
@eladb eladb added the ops-excellence Operational Excellence label Jul 10, 2018
@srchase srchase added feature-request A feature should be added or improved. and removed enhancement labels Jan 3, 2019
@fulghum fulghum added p1 package/tools Related to AWS CDK Tools or CLI labels Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. ops-excellence Operational Excellence p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants