Skip to content

Conversation

jviau
Copy link
Contributor

@jviau jviau commented Jul 14, 2025

Issue describing the changes in this PR

Part of #11010, #11168

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Registers health check services and 2 health checks for the web and script host lifecycle. Release notes are not yet updated as these services are still not yet consumed, and thus no runtime impact (yet)

@jviau jviau requested a review from a team as a code owner July 14, 2025 20:46
@jviau jviau requested a review from kshyju August 25, 2025 17:09
@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 17:50
Copy link
Contributor

@Copilot Copilot AI left a comment

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 registers health check services and implements two health checks for monitoring the web host and script host lifecycles in Azure Functions. It replaces FluentAssertions with AwesomeAssertions across test files and adds comprehensive health check infrastructure.

  • Adds health check registration to the web host service collection
  • Implements WebHostHealthCheck and ScriptHostHealthCheck with lifecycle monitoring
  • Creates standardized health check names and tags for Azure Functions
  • Replaces FluentAssertions with AwesomeAssertions in test files

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
WebJobs.Script.Tests.csproj Replaces FluentAssertions package with AwesomeAssertions
AppServiceHeaderFixupMiddlewareTests.cs Updates using statement for new assertion library
OpenTelemetryConfigurationExtensionsTests.cs Updates using statement for new assertion library
WebHostHealthCheckTests.cs Updates using statement for new assertion library
ScriptHostHealthCheckTests.cs Updates using statement for new assertion library
HealthCheckExtensionsTests.cs New test file for health check extension methods
WebHostHealthCheck.cs Adds XML documentation for the web host health check
ScriptHostHealthCheck.cs Adds XML documentation for the script host health check
HealthCheckTags.cs New file defining standardized health check tags
HealthCheckNames.cs New file defining standardized health check names
HealthCheckExtensions.cs New file with extension methods for registering health checks
WebHostServiceCollectionExtensions.cs Registers health check services in the web host

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

.Callback((HealthCheckRegistration registration) =>
{
Type r = registration.Factory.GetMethodInfo().ReturnType;
});
Copy link
Preview

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

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

The callback in this test setup captures a registration parameter but only assigns to a local variable that isn't used. This appears to be leftover debugging code that should be removed for clarity.

Suggested change
});
builder.Setup(b => b.Add(It.IsAny<HealthCheckRegistration>())).Returns(builder.Object);

Copilot uses AI. Check for mistakes.

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