fix: suppress RemoteA2aAgent experimental warning log spam#1388
Open
jsonmp-k8 wants to merge 2 commits intokagent-dev:mainfrom
Open
fix: suppress RemoteA2aAgent experimental warning log spam#1388jsonmp-k8 wants to merge 2 commits intokagent-dev:mainfrom
jsonmp-k8 wants to merge 2 commits intokagent-dev:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes log spam caused by experimental mode warnings from the google-adk library's RemoteA2aAgent class. The warning appears repeatedly during A2A agent interactions, flooding logs with notifications about the experimental status of the A2A implementation.
Changes:
- Added warning suppression using
warnings.catch_warnings()context manager aroundRemoteA2aAgentinstantiation - Scoped the suppression to only the specific experimental warning message, not applied globally
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Wrap RemoteA2aAgent instantiation in warnings.catch_warnings() to suppress the upstream google-adk experimental mode UserWarning that floods logs during A2A agent interactions. Closes kagent-dev#1379 Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Anchor the pattern to the start of the message to avoid accidentally matching unrelated warnings. Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
22b4533 to
4fc18ac
Compare
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.
Summary
RemoteA2aAgentinstantiation inwarnings.catch_warnings()to suppress the upstreamgoogle-adkexperimental modeUserWarningthat floods logs during A2A agent interactionsRemoteA2aAgentconstructor call site, not applied globallyCloses #1379
Test plan