feat: add dismissed property to the healthcheck section#10940
Merged
Conversation
dismissed property in a healthcheck sectiondismissed property to the healthcheck section
johnstcn
approved these changes
Nov 29, 2023
johnstcn
left a comment
Member
There was a problem hiding this comment.
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), | ||
| }, | ||
| }) |
Member
There was a problem hiding this comment.
non-blocking: this anonymous function is getting a bit heavy-weight and could probably use a refactor of some sort.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #10712
The last part of backend implementation. The
dismissedproperty is present in everyhealth check section.