Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 18, 2025

This PR implements a comprehensive health check package for Azure File Storage, following the established patterns used by other Azure service packages in this repository.

What's Added

Core Health Checks

  • FileShareAvailableHealthCheck: Validates that a specific Azure File Share is reachable and accessible
  • FileServiceAvailableHealthCheck: Validates that the Azure File Service itself is reachable and responsive

Authentication Support

The package supports all standard Azure authentication modes:

  • ServiceProvider: Uses pre-registered ShareServiceClient from dependency injection
  • ConnectionString: Direct connection string authentication
  • SharedKey: Account name and key authentication
  • DefaultAzureCredentials: Managed identity and default credential chain
  • AzureSasCredential: SAS token authentication

Configuration Options

Both health checks support flexible configuration:

  • Configuration-based setup via appsettings.json
  • Options-based setup with inline configuration
  • Configurable timeouts with proper degraded status handling
  • Comprehensive validation with detailed error messages

Example Usage

// Configuration-based approach
services.AddHealthChecks()
    .AddFileShareAvailability("my-fileshare");

// Options-based approach  
services.AddHealthChecks()
    .AddFileShareAvailability("my-fileshare", options =>
    {
        options.ShareName = "documents";
        options.ConnectionString = "DefaultEndpointsProtocol=https;...";
        options.Timeout = 5000;
    });

Package Integration

  • Added Azure.Storage.Files.Shares package dependency to central package management
  • Updated main NetEvolve.HealthChecks.Azure bundle package to include Files
  • Added Files to the supported services documentation

Comprehensive Testing

  • Unit Tests: Complete validation coverage for all configuration scenarios, authentication modes, and error conditions
  • Integration Tests: Real-world testing using the existing AzuriteAccess test infrastructure
  • 100+ test cases covering edge cases and validation scenarios

The implementation follows identical patterns to existing Azure packages (Blobs, Tables, Queues, ServiceBus) ensuring consistency and maintainability.

Fixes #37.

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:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] NetEvolve.HealthChecks.Azure.Files Implement NetEvolve.HealthChecks.Azure.Files package for Azure File Storage health checks Aug 18, 2025
@Copilot Copilot AI requested a review from samtrion August 18, 2025 20:52
Copilot finished work on behalf of samtrion August 18, 2025 20:52
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.

NetEvolve.HealthChecks.Azure.Files
2 participants