Make microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117
Make microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117rads-1996 wants to merge 15 commits intomicrosoft:mainfrom
microsoft-agents-hosting-core and microsoft-agents-activity optional dependencies#117Conversation
…onal dependencies
There was a problem hiding this comment.
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-activityandmicrosoft-agents-hosting-corefrom core dependencies into a new optionalhostingextra inpyproject.toml. - Wrapped imports of hosting-specific Microsoft Agents symbols in
try/except ImportErrorblocks across hosting modules and added a shared install-hint message. - Updated migration documentation to explain the new optional dependency model and the
hostingextra.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Fixes - #76