-
Notifications
You must be signed in to change notification settings - Fork 886
feat: add database support for dismissed healthchecks #10845
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
Conversation
@@ -70,3 +70,10 @@ SELECT value FROM site_configs WHERE key = 'oauth_signing_key'; | |||
-- name: UpsertOAuthSigningKey :exec | |||
INSERT INTO site_configs (key, value) VALUES ('oauth_signing_key', $1) | |||
ON CONFLICT (key) DO UPDATE set value = $1 WHERE site_configs.key = 'oauth_signing_key'; | |||
|
|||
-- name: GetDismissedHealthchecks :one | |||
SELECT value FROM site_configs WHERE key = 'dismissed_healthchecks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we coalesce this to []
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it. There is one drawback of this approach: with []
we will close the structure for extra properties since it will accept only array items. I'm happy to change it to []
if you think that it is fair.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, we could also coalesce it to {}
and then start off with {"dismissed": [...]}
if you want to keep it open. My main point here was to avoid downstream consumers having to deal with a potential nil
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be open. Should I rename it to health_settings
instead? (or healthpage_settings
, healthcheck_settings
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Sounds good, I could imagine other persistent health-related site configs going in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, converted it into health_settings
with default value {}
. The API implementation will be similar to the ServiceBanner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking on my side.
Related: #10712
This PR adds database support for dismissed healthchecks. The idea is to store healthcheck settings in JSON format in
site_configs
.