Skip to content

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

Merged
rads-1996 merged 18 commits into
microsoft:mainfrom
rads-1996:remove-hosting-dependencies
May 15, 2026
Merged

Make microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117
rads-1996 merged 18 commits into
microsoft: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
@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
Comment thread MIGRATION_A365.md Outdated
@rads-1996 rads-1996 force-pushed the remove-hosting-dependencies branch from e407278 to af4df5c Compare May 14, 2026 17:15
@rads-1996 rads-1996 requested a review from nikhilNava as a code owner May 14, 2026 17:15
@rads-1996 rads-1996 force-pushed the remove-hosting-dependencies branch from a8e9b1b to 81a716b Compare May 14, 2026 19:46
Comment thread pyproject.toml
@rads-1996 rads-1996 force-pushed the remove-hosting-dependencies branch from 04ab793 to 19a11e2 Compare May 14, 2026 21:28
@rads-1996 rads-1996 requested a review from nikhilNava May 15, 2026 14:33
@rads-1996 rads-1996 merged commit 4cc479b into microsoft:main May 15, 2026
8 checks passed
@rads-1996 rads-1996 deleted the remove-hosting-dependencies branch May 15, 2026 19:43
@rads-1996 rads-1996 mentioned this pull request May 18, 2026
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.

5 participants