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

feat(cli/support): confirm before creating bundle #12684

Merged
merged 6 commits into from
Mar 21, 2024
Merged

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Mar 20, 2024

Last must-haves of #12163

Forces user to confirm before creating a support bundle.
Also adds contextual information to the bundle under cli_logs.txt.
Finally, un-hides the support command`. EDIT: will un-hide closer to release.

@johnstcn johnstcn self-assigned this Mar 20, 2024
cli/support.go Show resolved Hide resolved
cli/support.go Outdated Show resolved Hide resolved
cli/support.go Outdated Show resolved Hide resolved
cli/support.go Outdated Show resolved Hide resolved
cli/support.go Outdated Show resolved Hide resolved
cli/support.go Outdated
Comment on lines 82 to 84
cliLog.Info(inv.Context(), "user confirmed manually", slog.F("answer", ans))
} else {
cliLog.Info(inv.Context(), "user auto-confirmed")
Copy link
Member

Choose a reason for hiding this comment

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

nit: debug or trace level?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah fair, we don't want unnecessary output.

}

// Check if we're running inside a workspace
if val, found := os.LookupEnv("CODER"); found && val == "true" {
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe create a util function for this?

cli/support.go Outdated Show resolved Hide resolved
@johnstcn johnstcn merged commit f2a9e51 into main Mar 21, 2024
26 checks passed
@johnstcn johnstcn deleted the cj/support-confirm branch March 21, 2024 17:06
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants