Fix stray dir creation with api server issue6667 - #6712
Open
llalitkumarrr wants to merge 7 commits into
Open
Conversation
…this will close issue number 6667 in adk-python github.
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.
1. Link to an existing issue (if applicable):
<app_name>directory created underagents_diron server paths becomes a phantom agent inlist_agents()#66672. Or, if no issue exists, describe the change:
Created
AgentAppMappingto load dictionary that searches the filesystem to correctly map an internal app name to its physical folder path when requested. Removed a hardcodeddict()cast inlocal_storage.pyso the dynamic map isn't prematurely evaluated into an empty dictionary, and added test cases to ensure the map gracefully handles missing agents and load errors.Problem:
When an App's name differs from its on-disk agent directory name, the local storage services create <agents_dir>/<app_name>/.adk/.... Because <app_name> is not a dotted name, AgentLoader.list_agents() picks it up as an agent directory, advertises it, and then fails to load it.
Solution:
A clear and concise description of what you want to happen and why you choose
this solution.
Testing Plan
Unit Tests:
tests/unittests/cli/test_fast_api.py.Please include a summary of passed
pytestresults.102 test passed with 10 warnings.