Skip to content

Add custom checks stores & storage checks - #5668

Open
rbev wants to merge 11 commits into
masterfrom
rhys/sql-customchecks2
Open

Add custom checks stores & storage checks#5668
rbev wants to merge 11 commits into
masterfrom
rhys/sql-customchecks2

Conversation

@rbev

@rbev rbev commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for storing custom check data in both PostgreSQL and SQL Server EF Core persistence layers. It introduces new migration files and updates the database model snapshots to include a new CustomChecks table. Additionally, there are minor updates to the .NET SDK version and some code organization improvements.

Database schema changes:

  • Added a new custom_checks table for PostgreSQL and a CustomChecks table for SQL Server, including columns for IDs, category, status, timestamps, failure reasons, and endpoint information. [1] [2]
  • Updated model snapshot files (PostgreSqlServiceControlDbContextModelSnapshot.cs, SqlServerServiceControlDbContextModelSnapshot.cs) to reflect the addition of the CustomCheckEntity and its mapping to the new tables. [1] [2]
  • Added EF Core migration designer file for SQL Server to support the new CustomChecks table.

Build and configuration updates:

  • Updated the .NET SDK version in global.json from 10.0.100 to 10.0.302 and changed the rollForward policy to disable.

Code and dependency improvements:

  • Added missing using CustomChecks; directives to relevant files for clarity and to ensure correct namespace usage. [1] [2]
  • Refactored the persistence configuration to clarify variable usage when creating the SqlServerPersistence instance.

@rbev
rbev marked this pull request as ready for review July 30, 2026 08:03
@johnsimons

Copy link
Copy Markdown
Member

@rbev just wondering if this is doing the same as #5658

@johnsimons

Copy link
Copy Markdown
Member

@rbev I think there is a misunderstanding here.
The reason we have a custom check for disk space for RavenDB Embedded is because we are in total control of the raven instance, we are hosting it ourselves. We do not monitor disk space for external RavenDB servers!
So, in our case both PostgreSQL and SqlServer are external resources so there is no need for us to do that. We assume that the database administrator would do those things or on the cloud the size automatically scales or they have other mechanisms to monitor these.

@rbev
rbev force-pushed the rhys/sql-customchecks2 branch from 4c78340 to f9804f5 Compare July 31, 2026 05:42
Status = c.Status,
ReportedAt = c.ReportedAt,
FailureReason = c.FailureReason
}).ToList(), new QueryStatsInfo("", page.Count, false));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Etag left blank, it will be revisited as part of other work.

Comment thread src/ServiceControl.Persistence.EFCore/Entities/CustomCheckEntity.cs
Comment thread src/ServiceControl.Persistence.EFCore/Implementation/CustomCheckDataStore.cs Outdated
Comment thread src/ServiceControl.Persistence.EFCore/Implementation/CustomCheckDataStore.cs Outdated
Comment thread src/ServiceControl.Persistence.EFCore/Implementation/CustomCheckDataStore.cs Outdated
Comment thread global.json Outdated
@rbev
rbev requested a review from johnsimons August 3, 2026 00:33

@johnsimons johnsimons 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.

I have approved it but read my latest comments

Comment thread src/ServiceControl.Persistence.EFCore/Implementation/CustomCheckDataStore.cs Outdated
Comment thread src/ServiceControl.Persistence.EFCore/Entities/CustomCheckEntity.cs
@rbev
rbev force-pushed the rhys/sql-customchecks2 branch from 877d301 to 078a082 Compare August 3, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants