-
Notifications
You must be signed in to change notification settings - Fork 273
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
Feature: implement get debug-info #778
Conversation
10c688d
to
cdd4279
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Just a bit of pedantry in my comments, except maybe that K8s namespace thing, which is possibly a bug. That aside, happy first feature! :D
Had a few nitpicks of my own but otherwise looks great! One thing we could improve though is the logging. E.g.: the body of the command action could look like this: const tempPath = join(garden.projectRoot, GARDEN_DIR_NAME, TEMP_DEBUG_ROOT)
const entry = log.info({ msg: "Collecting debug info", status: "active" })
const systemEntry = entry.info({ section: "system", msg: "collecting info", status: "active" })
await collectBasicDebugInfo(garden.projectRoot, systemEntry)
systemEntry.setSuccess({ msg: chalk.green(`Done (took ${systemEntry.getDuration(1)} sec)`), append: true })
const providerEntry = entry.info({ section: "providers", msg: "collecting info", status: "active" })
await collectProviderDebugInfo(garden, providerEntry, tempPath, opts.format)
providerEntry.setSuccess({ msg: chalk.green(`Done (took ${providerEntry.getDuration(1)} sec)`), append: true })
entry.setState("Preparing archive")
const outputFilename = DEBUG_ZIP_FILENAME.replace("TIMESTAMP", new Date().toISOString())
await zipFolder(tempPath, join(garden.projectRoot, outputFilename), log)
await remove(tempPath)
entry.setSuccess({ msg: "Done", append: true })
log.info(`\nDone! Please find your report under ${garden.projectRoot}.`)
return { result: 0 } With this, we can simply remove the log statements from Passing the system and provider entries like this also ensures that the errors get set on the appropriate entry. The end result looks something like this:
|
5ab427c
to
00a88ac
Compare
Includes all change requests for PR #778 plus fixes 404 on tmp-promise release 2.0.0 dependency and some tests which broke after rebasing.
Dear all, I have few notes and consideration to add:
Thanks again and please let me know if you have any other comment. |
I believe the |
One thing I noticed after approving is that the debug info is not git ignored. |
Implements a utility command used to generate reports containing information regarding the current project, OS and providers. It generates a zip file which can be attached to Github issues. Co-authored-by: Thorarinn Sigurdsson <[email protected]> Co-authored-by: Eyþór Magnússon <[email protected]>
Includes all change requests for PR #778 plus fixes 404 on tmp-promise release 2.0.0 dependency and some tests which broke after rebasing.
00a88ac
to
14063c0
Compare
This PR introduces the command:
As spec'd out in #547, it's a command to collect all sort of system, project and providers information in a zip file. This will be useful data users can attach to github issues.
Thanks,
E.