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

Add diagnostic command for debugging issues #463

Merged
merged 9 commits into from
Sep 24, 2021

Conversation

mjcheetham
Copy link
Collaborator

@mjcheetham mjcheetham commented Sep 22, 2021

Introduce a new command diagnose that can be run to execute various diagnostic tests. Tests exercise various parts of the product and dump out verbose environment/system information.

This can be useful for debugging problems in the wild by allowing an easy way to narrow down crashing bugs, and to gather important environment information.

In addition, this diagnostic work is extensible so that host providers can create their own diagnostics to test their host-specific components and logic.

Sample output:

$ git-credential-manager-core diagnose
Running diagnostics...

 [ OK ] Environment
 [ OK ] File system
 [ OK ] Networking
 [ OK ] Git
 [ OK ] Credential storage
 [ OK ] Microsoft authentication (AAD/MSA)
 [ OK ] GitHub API

Diagnostic summary: 7 passed, 0 skipped, 0 failed.
Log files:
  /Users/$USER/myrepo/gcm-diagnose.log

Caution: Log files may include sensitive information - redact before sharing.

Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

I appreciate the pluggable design of this. It's an excellent base to start, and we can update it incrementally after we see it in action while supporting the product.

@mjcheetham mjcheetham merged commit a5a1be2 into git-ecosystem:main Sep 24, 2021
@mjcheetham mjcheetham deleted the diagnose branch September 24, 2021 09:32
@mjcheetham mjcheetham mentioned this pull request Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants