8000 Copybara import of the project: · GeekyprogrammerEJ/adk-python@ad4226b · GitHub
[go: up one dir, main page]

Skip to content

Commit ad4226b

Browse files
kakao-bart-leecopybara-github
authored andcommitted
Copybara import of the project:
-- 1ca16ab by bart.lee(이철민)/kakao <bart.lee@kakaocorp.com>: chore: Improves session update time validation message Enhances the error message when a session's last update time is later than the storage update time. This provides better readability by formatting the timestamps in the error message. COPYBARA_INTEGRATE_REVIEW=google#446 from kakao-bart-lee:main a2a0cff PiperOrigin-RevId: 754452381
1 parent 9bec05c commit ad4226b

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
### ⚠ BREAKING CHANGES
2828

2929
* Auth: expose `access_token` and `refresh_token` at top level of auth
30-
credentails, instead of a `dict`
30+
credentials, instead of a `dict`
3131
([commit](https://github.com/google/adk-python/commit/956fb912e8851b139668b1ccb8db10fd252a6990)).
3232

3333
### Features
@@ -50,7 +50,7 @@
5050

5151
### Miscellaneous Chores
5252

53-
* README.md impprovements.
53+
* README.md improvements.
5454
* Various code improvements.
5555
* Various typo fixes.
5656
* Bump min version of google-genai to 1.11.0.
@@ -108,4 +108,4 @@
108108
* Built-in evaluation support
109109
* Development UI that makes local development easy
110110
* Deploy to Google Cloud Run, Agent Engine
111-
* (Experimental) Live(Bidi) auido/video agent support and Compositional Function Calling(CFC) support
111+
* (Experimental) Live(Bidi) audio/video agent support and Compositional Function Calling(CFC) support

src/google/adk/sessions/database_session_service.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,11 @@ def append_event(self, session: Session, event: Event) -> Event:
484484

485485
if storage_session.update_time.timestamp() > session.last_update_time:
486486
raise ValueError(
487-
f"Session last_update_time {session.last_update_time} is later than"
488-
f" the upate_time in storage {storage_session.update_time}"
489-
)
487+
f"Session last_update_time "
488+
f"{datetime.fromtimestamp(session.last_update_time):%Y-%m-%d %H:%M:%S} "
489+
f"is later than the update_time in storage "
490+
f"{storage_session.update_time:%Y-%m-%d %H:%M:%S}"
491+
)
490492

491493
# Fetch states from storage
492494
storage_app_state = sessionFactory.get(

src/google/adk/tools/openapi_tool/openapi_spec_parser/operation_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def _process_operation_parameters(self):
8383
schema.description = (
8484
description if not schema.description else schema.description
8585
)
86-
# param.required can be None
87-
required = param.required if param.required is not None else False
86+
required = param.required
8887

8988
self.params.append(
9089
ApiParameter(

tests/unittests/tools/openapi_tool/openapi_spec_parser/test_operation_parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,9 @@ def test_get_json_schema(sample_operation):
347347
assert json_schema['type'] == 'object'
348348
assert 'param1' in json_schema['properties']
349349
assert 'prop1' in json_schema['properties']
350-
# By default nothing is required unless explicitly stated
351-
assert 'required' not in json_schema or json_schema['required'] == []
350+
assert 'param1' in json_schema['required']
351+
assert 'prop1' in json_schema['required']
352+
352353

353354
def test_get_signature_parameters(sample_operation):
354355
"""Test get_signature_parameters method."""

0 commit comments

Comments
 (0)
0