Skip to content

feat: add CLI execution mode and YAML hot-reload support#9

Merged
javaChip56 merged 3 commits intomasterfrom
enhancements
Mar 18, 2026
Merged

feat: add CLI execution mode and YAML hot-reload support#9
javaChip56 merged 3 commits intomasterfrom
enhancements

Conversation

@javaChip56
Copy link
Copy Markdown
Owner

Summary

This PR adds two major post-v1 enhancements to ApiHealthDashboard:

  • a one-shot CLI execution mode for running the full suite or selected endpoint YAML files with machine-readable output

  • YAML hot-reload for dashboard.yaml and referenced endpoint files so config changes can be applied without restarting the app

What Changed

  • added CLI mode with --cli --all for full-suite execution

  • added CLI mode with repeated --endpoint-file arguments for selected endpoint YAML execution

  • added machine-readable JSON output to stdout for CLI runs

  • added optional JSON or XML file output with --output-file and --output-format

  • added CLI report models, serializers, and execution service

  • extended YAML loading to support selected endpoint-file execution for CLI mode

  • added hot-reload watchers for dashboard.yaml and referenced endpoint YAML files

  • added debounced YAML reload behavior for create, change, delete, and rename events

  • updated runtime config handling so the app can swap to new YAML safely without restarting

  • updated the scheduler to reload polling loops when endpoint config changes

  • preserved runtime state for endpoints that remain present across YAML reloads

  • updated configuration warning handling so reload failures keep the last good config active and surface warnings in the UI

  • expanded test coverage for CLI parsing, CLI reporting, state preservation, scheduler reload, and config hot-reload behavior

  • updated README with CLI usage and YAML hot-reload documentation

Validation

  • dotnet build ApiHealthDashboard.sln -c Release

  • dotnet test ApiHealthDashboard.sln -c Release

Result:

  • 73 tests passed

Notes

  • CLI stdout remains JSON by default for automation use cases

  • YAML reload is debounced and non-destructive: if a reload fails, the app keeps the last successfully loaded configuration active

gali added 3 commits March 18, 2026 18:42
…reporting

- Add CliExecutionService for executing health checks on configured endpoints.
- Introduce CliOptions for parsing command-line arguments.
- Implement output serialization for JSON and XML formats in CliReportSerializer.
- Create CliParseResult to handle CLI parsing results and errors.
- Add support for hot-reloading dashboard configuration with DashboardConfigHotReloadService.
- Implement tests for CliExecutionService, CliOptions, and DashboardConfigHotReloadService.
- Add new endpoint configuration for UTPL Integration API.
- Enhance PollingSchedulerService to synchronize state store with current configuration.
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown
Owner Author

@javaChip56 javaChip56 left a comment

Choose a reason for hiding this comment

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

Looks ok.

@javaChip56 javaChip56 merged commit d0c1d2d into master Mar 18, 2026
5 checks passed
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