Skip to content

feat(cli): support bundle: dump healthcheck summary #12963

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

Merged
merged 11 commits into from
Apr 16, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Apr 15, 2024

(From comment in #12951 (comment))
This PR modifies the support bundle command to dump a summary of deployment health and the CLI netcheck to stdout, when run:

$ go run ./cmd/coder rsupport bundle nonix --yes --output-file ~/tmp/coder-support.zip
Running inside Coder workspace; this can affect results!
WARN: Deployment health issues detected:
  | Workspace Proxies: Warn: EWP04: unhealthy: request to proxy failed: Get "http://127.0.0.1:3001/healthz-report": dial tcp 127.0.0.1:3001: connect: connection refused
Wrote support bundle to /home/coder/tmp/coder-support.zip

Note: I introduced the BaseReport as a way to avoid writing five or six different Summarize() methods.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM!

type WebsocketReport struct {
// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.
Healthy bool `json:"healthy"`
Severity health.Severity `json:"severity" enums:"ok,warning,error"`
Warnings []string `json:"warnings"`
Copy link
Member Author

Choose a reason for hiding this comment

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

review: this is technically a breaking change... but it should have been this way from the beginning

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Nice 👍 👍

@johnstcn johnstcn merged commit 407e61e into main Apr 16, 2024
25 of 27 checks passed
@johnstcn johnstcn deleted the cj/healthreport-summarize branch April 16, 2024 12:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 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.

3 participants