Skip to content

feat: add dismissed property to the healthcheck section#10940

Merged
mtojek merged 17 commits into
mainfrom
10712-api-health-settings-dismissed
Nov 29, 2023
Merged

feat: add dismissed property to the healthcheck section#10940
mtojek merged 17 commits into
mainfrom
10712-api-health-settings-dismissed

Conversation

@mtojek

@mtojek mtojek commented Nov 29, 2023

Copy link
Copy Markdown
Member

Fixes: #10712

The last part of backend implementation. The dismissed property is present in everyhealth check section.

@mtojek mtojek self-assigned this Nov 29, 2023
@mtojek mtojek changed the title feat: include dismissed property in a healthcheck section feat: add dismissed property to the healthcheck section Nov 29, 2023
@mtojek mtojek marked this pull request as ready for review November 29, 2023 14:39

@BrunoQuaresma BrunoQuaresma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FE looks good!

@johnstcn johnstcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, some comments but nothing blocking. 👍

Comment thread coderd/coderd.go
Comment on lines +411 to 436
dismissedHealthchecks := loadDismissedHealthchecks(ctx, options.Database, options.Logger)
return healthcheck.Run(ctx, &healthcheck.ReportOptions{
Database: healthcheck.DatabaseReportOptions{
DB: options.Database,
Threshold: options.DeploymentValues.Healthcheck.ThresholdDatabase.Value(),
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionDatabase),
},
Websocket: healthcheck.WebsocketReportOptions{
AccessURL: options.AccessURL,
APIKey: apiKey,
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionWebsocket),
},
AccessURL: healthcheck.AccessURLReportOptions{
AccessURL: options.AccessURL,
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionAccessURL),
},
DerpHealth: derphealth.ReportOptions{
DERPMap: api.DERPMap(),
DERPMap: api.DERPMap(),
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionDERP),
},
WorkspaceProxy: healthcheck.WorkspaceProxyReportOptions{
CurrentVersion: buildinfo.Version(),
WorkspaceProxiesFetchUpdater: *(options.WorkspaceProxiesFetchUpdater).Load(),
Dismissed: slices.Contains(dismissedHealthchecks, healthcheck.SectionWorkspaceProxy),
},
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

non-blocking: this anonymous function is getting a bit heavy-weight and could probably use a refactor of some sort.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ack

Comment thread coderd/debug.go
Comment thread coderd/healthcheck/derphealth/derp_test.go
Comment thread coderd/healthcheck/workspaceproxy_test.go Outdated
@mtojek mtojek enabled auto-merge (squash) November 29, 2023 16:29
@mtojek mtojek merged commit 2b574e2 into main Nov 29, 2023
@mtojek mtojek deleted the 10712-api-health-settings-dismissed branch November 29, 2023 16:37
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 29, 2023
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.

health check: dismiss warning

3 participants