Move ErrorMessage to microsoft-agents-activity to resolve circular dependency#240
Merged
cleemullins merged 2 commits intomainfrom Nov 12, 2025
Merged
Move ErrorMessage to microsoft-agents-activity to resolve circular dependency#240cleemullins merged 2 commits intomainfrom
cleemullins merged 2 commits intomainfrom
Conversation
- Moved error_message.py from microsoft-agents-hosting-core to microsoft-agents-activity - Updated all package imports to use new location (microsoft_agents.activity.errors) - Maintained backward compatibility via re-export in hosting-core - Verified all existing tests pass - Resolved circular dependency (hosting-core no longer depends on activity for ErrorMessage) Co-authored-by: cleemullins <1165321+cleemullins@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move ErrorMessage to microsoft-agents-activity
Move ErrorMessage to microsoft-agents-activity to resolve circular dependency
Nov 12, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR successfully resolves a circular dependency issue by moving the ErrorMessage class from microsoft-agents-hosting-core to microsoft-agents-activity, where it logically belongs as a lower-level dependency.
Key Changes:
- Relocated
error_message.pyfrom hosting-core to the activity package - Updated imports across 6 packages to use the new canonical location
- Maintained backward compatibility by re-exporting
ErrorMessagefrom hosting-core's__init__.py
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
libraries/microsoft-agents-activity/microsoft_agents/activity/errors/error_message.py |
New location for ErrorMessage class implementation |
libraries/microsoft-agents-activity/microsoft_agents/activity/errors/__init__.py |
Updated to import ErrorMessage locally and export it |
libraries/microsoft-agents-activity/microsoft_agents/activity/errors/error_resources.py |
Changed to use local import of ErrorMessage |
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/errors/__init__.py |
Re-exports ErrorMessage from activity package for backward compatibility |
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/errors/error_resources.py |
Updated to import ErrorMessage from activity package |
libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/errors/__init__.py |
Updated import path to canonical location |
libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/errors/error_resources.py |
Updated import path to canonical location |
libraries/microsoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/errors/__init__.py |
Updated import path to canonical location |
libraries/microsoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/errors/error_resources.py |
Updated import path to canonical location |
libraries/microsoft-agents-storage-blob/microsoft_agents/storage/blob/errors/__init__.py |
Updated import path to canonical location |
libraries/microsoft-agents-storage-blob/microsoft_agents/storage/blob/errors/error_resources.py |
Updated import path to canonical location |
libraries/microsoft-agents-storage-cosmos/microsoft_agents/storage/cosmos/errors/__init__.py |
Updated import path to canonical location |
libraries/microsoft-agents-storage-cosmos/microsoft_agents/storage/cosmos/errors/error_resources.py |
Updated import path to canonical location |
libraries/microsoft-agents-hosting-teams/microsoft_agents/hosting/teams/errors/__init__.py |
Updated import path to canonical location |
libraries/microsoft-agents-hosting-teams/microsoft_agents/hosting/teams/errors/error_resources.py |
Updated import path to canonical location |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rodrigobr-msft
approved these changes
Nov 12, 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.
microsoft-agents-hosting-coredepends onmicrosoft-agents-activity, butErrorMessagewas located in hosting-core and imported by activity, creating a circular dependency.Changes
error_message.pyfrommicrosoft-agents-hosting-coretomicrosoft-agents-activity__init__.pyImport paths
Both imports resolve to the same class. No breaking changes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.