Skip to content

Enhance DataEngine health checks to use component health endpoints with fallback#99

Merged
mm-kgi merged 73 commits into
developfrom
627-healthcheck-endpoint-configurabale
Apr 29, 2026
Merged

Enhance DataEngine health checks to use component health endpoints with fallback#99
mm-kgi merged 73 commits into
developfrom
627-healthcheck-endpoint-configurabale

Conversation

@mm-kgi

@mm-kgi mm-kgi commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR improves the reliability of DataEngine health checks by prioritizing dedicated component health endpoints instead of relying on business API calls.

Previously, health checks used business GET endpoints (e.g., Template Registry/Repository APIs), which could fail in secured environments due to authentication/authorization requirements, leading to false-negative health statuses.


Key Changes

  • Health Endpoint Preference

    • DataEngine now uses configured health endpoints for external components when available.
    • For Eclipse BaSyx Registry and Repository, /actuator/health is supported and used as the preferred probe endpoint.
  • Fallback Mechanism

    • If a health endpoint is:
      • Not configured → fallback to existing business endpoint behavior.
  • Configuration Handling

    • Supports configurable health endpoint paths for:
      • Template Registry
      • Template Repository
      • Plugins
    • Default health endpoint is applied where applicable.

mm-kgi added 30 commits March 5, 2026 14:45
@github-actions

github-actions Bot commented Apr 27, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@mm-kgi mm-kgi changed the title 627 healthcheck endpoint configurabale Use Healthcheck endpoint from configurations Apr 27, 2026
@mm-kgi mm-kgi changed the title Use Healthcheck endpoint from configurations Enhance DataEngine health checks to use component health endpoints with fallback Apr 27, 2026
@mm-kgi
mm-kgi marked this pull request as ready for review April 27, 2026 12:44
Copilot AI review requested due to automatic review settings April 27, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates DataEngine’s external dependency health checks to prefer component-specific health endpoints (e.g., /actuator/health, /healthz) and fall back to the existing business API probes when a health endpoint isn’t configured.

Changes:

  • Add healthEndpoint support to configured service instances (template repositories/registries and plugins).
  • Update health check implementations to probe healthEndpoint when present, otherwise use the existing ?limit=1 business endpoint fallback.
  • Extend unit/module test configurations and unit tests to cover the new endpoint-selection behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml Adds plugin and template component healthEndpoint env vars for the example setup.
example/docker-compose.yml Adds healthEndpoint env vars for plugin and template components in the main example compose.
source/AAS.TwinEngine.DataEngine/appsettings.json Adds healthEndpoint defaults for plugins and template components.
source/AAS.TwinEngine.DataEngine/appsettings.development.json Adds healthEndpoint defaults for plugins and template components in development settings.
source/AAS.TwinEngine.DataEngine/ServiceConfiguration/Config/TemplateManagementConfig.cs Extends ServiceInstance with HealthEndpoint configuration.
source/AAS.TwinEngine.DataEngine/Infrastructure/Monitoring/TemplateRepositoryHealthCheck.cs Uses configured health endpoints with fallback for template repository checks.
source/AAS.TwinEngine.DataEngine/Infrastructure/Monitoring/TemplateRegistryHealthCheck.cs Uses configured health endpoints with fallback for template registry checks.
source/AAS.TwinEngine.DataEngine/Infrastructure/Monitoring/PluginAvailabilityHealthCheck.cs Uses per-plugin configured health endpoints with fallback to default healthz.
source/AAS.TwinEngine.DataEngine.UnitTests/Infrastructure/Monitoring/TemplateRepositoryHealthCheckTests.cs Adds tests to verify configured vs fallback endpoint behavior.
source/AAS.TwinEngine.DataEngine.UnitTests/Infrastructure/Monitoring/TemplateRegistryHealthCheckTests.cs Adds tests to verify configured vs fallback endpoint behavior.
source/AAS.TwinEngine.DataEngine.UnitTests/Infrastructure/Monitoring/PluginAvailabilityHealthCheckTests.cs Adds tests to verify custom/default plugin health endpoint selection.
source/AAS.TwinEngine.DataEngine.ModuleTests/TestData/v2-config/appsettings.json Updates module test config to include healthEndpoint entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread example/docker-compose.yml Outdated
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Test & Coverage Report

Test Results Summary

Metric Count
✅ Passed 1282
❌ Failed 0
⏭️ Skipped 0

View Detailed Test Results


Code Coverage

Unit Tests Coverage

Package Line Rate Branch Rate Complexity Health
AAS.TwinEngine.DataEngine 90% 82% 1830
Summary 90% (2886 / 3213) 82% (1262 / 1543) 1830

Minimum allowed line rate is 80%

Module Tests Coverage

Package Line Rate Branch Rate Complexity Health
AAS.TwinEngine.DataEngine 60% 46% 1830
Summary 60% (1937 / 3213) 46% (703 / 1543) 1830

@mm-kgi
mm-kgi merged commit 4e95b7b into develop Apr 29, 2026
10 checks passed
@mm-hsh
mm-hsh deleted the 627-healthcheck-endpoint-configurabale branch May 19, 2026 06:45
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.

3 participants