Skip to content

Make microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117

Open
rads-1996 wants to merge 15 commits intomicrosoft:mainfrom
rads-1996:remove-hosting-dependencies
Open

Make microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117
rads-1996 wants to merge 15 commits intomicrosoft:mainfrom
rads-1996:remove-hosting-dependencies

Conversation

@rads-1996
Copy link
Copy Markdown
Member

@rads-1996 rads-1996 commented May 4, 2026

Fixes - #76

Copilot AI review requested due to automatic review settings May 4, 2026 20:53
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR makes the hosting-related Microsoft Agents packages optional by moving them behind a new hosting extra and adding import-time fallback handling in hosting modules.

Changes:

  • Moved microsoft-agents-activity and microsoft-agents-hosting-core from core dependencies into a new optional hosting extra in pyproject.toml.
  • Wrapped imports of hosting-specific Microsoft Agents symbols in try/except ImportError blocks across hosting modules and added a shared install-hint message.
  • Updated migration documentation to explain the new optional dependency model and the hosting extra.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/microsoft/opentelemetry/a365/hosting/token_cache_helpers/agent_token_cache.py Makes hosting-core imports optional and logs an install hint on missing dependency.
src/microsoft/opentelemetry/a365/hosting/scope_helpers/utils.py Makes Activity import optional and logs an install hint.
src/microsoft/opentelemetry/a365/hosting/scope_helpers/populate_baggage.py Makes TurnContext import optional and logs an install hint.
src/microsoft/opentelemetry/a365/hosting/middleware/output_logging_middleware.py Makes activity/turn-context imports optional and logs an install hint.
src/microsoft/opentelemetry/a365/hosting/middleware/observability_hosting_manager.py Makes MiddlewareSet import optional and logs an install hint.
src/microsoft/opentelemetry/a365/hosting/middleware/baggage_middleware.py Makes activity/turn-context imports optional and logs an install hint.
src/microsoft/opentelemetry/a365/constants.py Adds a shared install-hint string for missing hosting dependencies.
pyproject.toml Moves hosting packages into a new optional dependency group.
MIGRATION_A365.md Documents the new hosting extra and optional dependency behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/microsoft/opentelemetry/a365/hosting/token_cache_helpers/agent_token_cache.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/scope_helpers/utils.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/scope_helpers/populate_baggage.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/output_logging_middleware.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/baggage_middleware.py Outdated
Comment thread MIGRATION_A365.md Outdated
Copy link
Copy Markdown
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

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/baggage_middleware.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/output_logging_middleware.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/scope_helpers/utils.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/scope_helpers/populate_baggage.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/token_cache_helpers/agent_token_cache.py Outdated
Comment thread tests/a365/hosting/token_cache_helpers/test_agent_token_cache.py Outdated
@rads-1996 rads-1996 requested a review from Copilot May 4, 2026 22:45
Copy link
Copy Markdown
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

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MIGRATION_A365.md Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/token_cache_helpers/agent_token_cache.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/baggage_middleware.py Outdated
Comment thread src/microsoft/opentelemetry/a365/hosting/middleware/output_logging_middleware.py Outdated
Copy link
Copy Markdown
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml Outdated
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