Skip to content

Fixes after review#14

Merged
penyland merged 2 commits intomainfrom
fix
Oct 21, 2025
Merged

Fixes after review#14
penyland merged 2 commits intomainfrom
fix

Conversation

@penyland
Copy link
Owner

This pull request introduces several improvements to the Azure configuration and identity helper utilities, as well as a fix to the feature module registration logic. The changes enhance error messaging, correct environment detection, improve managed identity credential handling, and address duplicate module registration.

Azure Configuration and Identity Improvements:

  • Improved the error message thrown when a valid Azure App Configuration endpoint is missing, making it clearer how to provide the endpoint.
  • Updated EnvironmentHelper.IsRunningInAzureAppService to correctly detect Azure App Service by checking for the presence of the WEBSITE_SITE_NAME environment variable, rather than comparing its value to "true".
  • Refactored TokenCredentialHelper.GetTokenCredential to properly handle user-assigned managed identities by checking if a client ID is provided or set in the environment, and conditionally creating the appropriate ManagedIdentityCredential.

Feature Module Registration Fix:

  • Removed the check and warning for duplicate feature module registration, allowing all discovered modules to be registered without skipping any.

Copilot AI review requested due to automatic review settings October 21, 2025 19:33
Copy link
Contributor

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 pull request addresses post-review feedback by fixing bugs and improving error messaging in Azure-related utilities and feature module registration. The changes correct environment detection logic, improve managed identity credential handling, enhance error messages, and remove duplicate module registration checks.

Key changes:

  • Fixed Azure App Service environment detection to check for presence of environment variable instead of comparing to "true"
  • Improved managed identity credential handling to properly support system-assigned identities when no client ID is provided
  • Enhanced error message clarity for missing Azure App Configuration endpoints

Reviewed Changes

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

File Description
WebApplicationBuilderExtensions.cs Removed duplicate module registration check to allow all discovered modules to be registered
TokenCredentialHelper.cs Fixed managed identity credential creation to properly handle both system-assigned and user-assigned identities
EnvironmentHelper.cs Corrected Azure App Service detection to check for variable presence instead of comparing value to "true"
ConfigurationBuilderExtensions.cs Improved error message clarity for missing Azure App Configuration endpoint

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

…xtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@penyland penyland merged commit 038caa4 into main Oct 21, 2025
2 checks passed
@penyland penyland deleted the fix branch January 30, 2026 14:18
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