Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mtojek
Copy link
Member

@mtojek mtojek commented Nov 29, 2023

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
Copy link
Contributor

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

FE looks good!

Copy link
Member

@johnstcn johnstcn left a comment

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 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
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
Member Author

Choose a reason for hiding this comment

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

Ack

@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

4 participants