Repository navigation
Conversation
…order TestParseToolCallArguments lowered only the root logger with caplog.at_level(logging.DEBUG). When a CLI test runs earlier in the same process, setup_adk_logger() leaves the "google_adk" logger at INFO, so lite_llm skips its DEBUG branch and four tests fail depending on test order. Set the level on the "google_adk" logger explicitly, as is already done elsewhere in this file.
9 tasks done
7 of 9 tasks
Author
|
This was fixed on main in eb53675, which scopes the same caplog calls (and the WARNING ones in this class) to the google_adk logger, so I'm closing this one. Thanks! |
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.
Link to Issue or Description of Change
2. Or, if no issue exists, describe the change:
Problem:
Four tests in
TestParseToolCallArguments(tests/unittests/models/test_litellm.py) fail depending on test order:test_repaired_arguments_log_debug_with_raw_payloadtest_repaired_arguments_without_function_nametest_literal_eval_layer_logs_debug_not_warningtest_literal_eval_without_function_name_logs_debugThey use
caplog.at_level(logging.DEBUG), which only lowers the root logger. CLI tests callsetup_adk_logger(), which sets thegoogle_adklogger to INFO and leaves it there. When a CLI test runs earlier in the same process,logger.isEnabledFor(logging.DEBUG)inlite_llm.pyis False, the DEBUG branch is skipped, and the assertions on the raw payload fail.Reproduce on
main:Solution:
Set the level on the
google_adklogger explicitly:caplog.at_level(logging.DEBUG, logger="google_adk"). This matches the fix already used elsewhere in the same file. Test-only change; no library code is modified.Testing Plan
Unit Tests:
Note: on a full local run,
test_gke_code_executor.pyfails with kubernetes 37.0.0. That is unrelated to this change and tracked in #7443.Manual End-to-End (E2E) Tests:
Not applicable: test-only change.
Checklist