Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 21, 2025

This PR implements a new health check package NetEvolve.HealthChecks.Npgsql.Devart that provides PostgreSQL database health checks using Devart's PostgreSQL provider (Devart.Data.PostgreSql) instead of the standard Npgsql provider.

What's Added

  • NetEvolve.HealthChecks.Npgsql.Devart package with complete implementation following established patterns
  • Configuration compatibility with existing NetEvolve.HealthChecks.Npgsql package (uses same HealthChecks:PostgreSql configuration section)
  • Comprehensive integration tests with proper license requirement handling
  • Complete documentation and usage examples

Key Features

The new package provides:

  • AddPostgreSqlDevart() extension method for service registration
  • Support for both configuration-based and builder-based setup approaches
  • Proper timeout handling with degraded status for slow connections
  • Validation for connection strings and timeout values
  • Default tags: ["postgresql", "database", "devart"]

Usage Examples

Configuration-based approach:

services.AddHealthChecks()
    .AddPostgreSqlDevart("MyDatabase");

Builder-based approach:

services.AddHealthChecks()
    .AddPostgreSqlDevart("MyDatabase", options =>
    {
        options.ConnectionString = "connection string";
        options.Timeout = 5000;
    });

The configuration structure remains compatible with the existing Npgsql package, allowing easy migration:

{
  "HealthChecks": {
    "PostgreSql": {
      "MyDatabase": {
        "ConnectionString": "connection string",
        "Timeout": "5000"
      }
    }
  }
}

Implementation Details

  • Uses PgSqlConnection from Devart.Data.PostgreSql package
  • Follows the same architectural patterns as NetEvolve.HealthChecks.SqlServer.Devart
  • Includes source generator integration for SQL health check implementation
  • Comprehensive test coverage with scenarios for healthy, degraded, and unhealthy states
  • Tests are marked with license requirement skip (Devart requires commercial license)

Fixes #813.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.devart.com
    • Triggering command: curl -s REDACTED (dns block)
  • www.nuget.org
    • Triggering command: curl -s REDACTED$filter=Id%20eq%20'Devart.Data.PostgreSql'&$top=1&$select=Description (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] NetEvolve.HealthChecks.Npgsql.Devart Add NetEvolve.HealthChecks.Npgsql.Devart package for PostgreSQL health checks using Devart provider Aug 21, 2025
Copilot AI requested a review from samtrion August 21, 2025 22:05
Copilot finished work on behalf of samtrion August 21, 2025 22:05
@samtrion samtrion added the type:feature Indicates a new feature or enhancement to be added. label Oct 14, 2025
Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
@samtrion samtrion closed this Oct 24, 2025
@samtrion samtrion deleted the copilot/fix-813 branch November 1, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NetEvolve.HealthChecks.Npgsql.Devart

2 participants