Add use env id check to validation and update logs#21
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR makes environment_id conditionally required based on a feature flag get_use_environment_id(). The changes ensure that when the environment ID feature is disabled, validation and logging messages no longer require or reference the environment_id parameter.
Key changes:
- Modified validation logic to skip
environment_idchecks when the feature is disabled - Updated logging messages to exclude
environment_idwhen the feature is disabled
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mcp_tool_server_configuration_service.py | Updated validation and logging to conditionally handle environment_id based on feature flag |
| mcp_tool_registration_service.py (semantickernel) | Modified validation to conditionally require environment_id |
| mcp_tool_registration_service.py (openai) | Updated logging to conditionally include environment_id |
| mcp_tool_registration_service.py (azureaifoundry) | Updated logging and contains legacy "Kairo" imports that need updating |
| mcp_tool_registration_service.py (agentframework) | Updated logging to conditionally include environment_id |
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/mcp_tool_registration_service.py:27
- The imports reference 'microsoft_kairo' which is a legacy keyword that should be removed. These should be updated to use the correct package name 'microsoft_agents_a365.tooling' instead. Based on other files in the codebase, these imports should be:
from ...common.services.mcp_tool_server_configuration_service import McpToolServerConfigurationServiceandfrom ...common.utils.constants import Constants.
from microsoft_kairo.tooling.common.services.mcp_tool_server_configuration_service import (
McpToolServerConfigurationService,
)
from microsoft_kairo.tooling.common.utils.constants import Constants
mrunalhirve128
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validation checks on environment id should only run if the environment id is being used - when the env setting to use enviroment id is disabled, we should skip these checks.
Additionally, updated logs to only log environment info if environment id is being used.