Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

Status: Feature Already Exists

The Python SDK already has full parity with .NET PR #133. Both scope and domain override features were implemented in PR #107 (commit f47b62b) before this parity issue was created.

Existing Implementation

Scope Override (A365_OBSERVABILITY_SCOPE_OVERRIDE)

  • Location: microsoft_agents_a365.runtime.environment_utils.get_observability_authentication_scope()
  • Behavior: Returns override scope if set, otherwise defaults to production scope
  • Tests: 4 tests covering override, empty values, whitespace handling

Domain Override (A365_OBSERVABILITY_DOMAIN_OVERRIDE)

  • Location: microsoft_agents_a365.observability.core.exporters.agent365_exporter._Agent365Exporter
  • Behavior: Uses override domain if valid (no :// or /), otherwise queries PowerPlatformApiDiscovery
  • Validation: get_validated_domain_override() rejects malformed domains
  • Tests: 5 tests covering valid override, default fallback, empty/invalid domain handling

Verification

Both features match the .NET implementation:

# Scope override example
os.environ["A365_OBSERVABILITY_SCOPE_OVERRIDE"] = "https://preprod.powerplatform.com/.default"
scopes = get_observability_authentication_scope()  # Returns override

# Domain override example  
os.environ["A365_OBSERVABILITY_DOMAIN_OVERRIDE"] = "preprod-endpoint.com"
exporter = _Agent365Exporter(token_resolver, cluster_category="test")
# Uses preprod-endpoint.com instead of querying discovery service

Recommendation

Close as wontfix - no implementation needed.

Original prompt

This section details on the original issue you should resolve

<issue_title>[SDK Parity] Python for PR microsoft/Agent365-dotnet#133</issue_title>
<issue_description>## SDK Parity Update Required

This issue was automatically created by the AI-First Polling workflow to maintain SDK parity.

Source PR Information

Original PR: microsoft/Agent365-dotnet#133 - [Observability] Scope and domain overrides
PR URL: microsoft/Agent365-dotnet#133
PR Author: @threddy

PR Description

Why? To enable 1P testing in pre-prodWhat? Enable overrides for scope and domain via environment variables "A365_OBSERVABILITY_DOMAIN_OVERRIDE" and "A365_OBSERVABILITY_SCOPE_OVERRIDE".------This PR introduces configuration-based overrides for the observability domain and authentication scope to enable testing against pre-production environments. The changes add two new configuration keys (A365_OBSERVABILITY_DOMAIN_OVERRIDE and A365_OBSERVABILITY_SCOPES_OVERRIDE) that allow runtime customization of Power Platform API endpoints and authentication scopes without code changes.Key ChangesAdded EnvironmentUtils.Initialize() method to cache scope override from configurationExtended PowerPlatformApiDiscovery and Agent365ExporterCore to accept optional domain overridesCreated comprehensive test coverage for both override mechanisms


Parity Task

Changes detected in: .NET/C# SDK
Target SDK: Python

Action Required

Please apply the changes described in the original PR (microsoft/Agent365-dotnet#133) to the Python SDK to maintain feature parity across all SDKs.

Before implementing:

  • First, check if this feature already exists in the Python SDK
  • If the feature is already implemented, close this issue with the wontfix label and add a comment explaining that parity already exists

For bug fixes (IMPORTANT):

  • Bug fixes require extra caution - only act if the same bug exists in the Python SDK
  • Carefully analyze whether the bug described in the original PR replicates in the target platform
  • If the bug does NOT exist in the Python SDK, close this issue with the wontfix label and explain that the bug is not present
  • Stay strictly in context - only fix the specific bug described, do not make additional changes or "improvements"
  • Do not port bug fixes that are specific to the source SDK's language or platform constraints

When creating the PR for this implementation:

  • Assign the PR to @threddy (the author of the original PR)
  • Reference this issue in the PR description
  • Ensure the PR description explains what parity changes were made

Implementation Guidelines for Python

When implementing this feature in the Python SDK:

  • Review existing code in python/libraries/ to understand the codebase structure and patterns
  • Follow the coding style, naming conventions, and architectural patterns used in the Python SDK
  • Check for configuration files (e.g., pyproject.toml, .flake8, mypy.ini) that define coding standards
  • Ensure your implementation is consistent with existing SDK components
  • Include appropriate tests following the testing patterns in the Python SDK

Related Information


This is an automated issue. Please close with wontfix label if parity is not needed.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

@sergioescalera
Copy link
Contributor

🤖 Auto-Assignment

This PR was automatically assigned to @threddy for review.

Reason: This is a parity implementation for issue #108, which was triggered by @threddy's original PR (microsoft/Agent365-dotnet#133).

Next Steps:

  • @threddy: Please review this implementation to ensure it matches your intent
  • Validate the parity changes are correct and complete
  • Approve and merge when satisfied

Automated by AI-First Polling Workflow

Copilot AI changed the title [WIP] Update SDK parity for Python integration Close SDK parity issue - scope and domain overrides already implemented Jan 9, 2026
Copilot AI requested a review from sergioescalera January 9, 2026 18:06
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.

[SDK Parity] Python for PR microsoft/Agent365-dotnet#133

3 participants