alisha-1000 opened a new pull request, #41339:
URL: https://github.com/apache/beam/pull/41339
Fixes #41299
`_invoke_agent` called `get_session(session_id)` positionally. ADK's
`get_session` is keyword-only, so the call always raised `TypeError`;
the broad `except Exception` then called `create_session` on every
invocation, and a reused `session_id` failed with `AlreadyExistsError`.
Changes:
- Look the session up with keyword arguments and create it only when
`get_session` returns `None`.
- Tolerate `AlreadyExistsError` from `create_session`, because elements
in one batch run concurrently and can race to create the same session.
- Tests: reuse of a `session_id` across two calls, and two elements
sharing a `session_id` in one batch. Existing mocks now return `None`
for a missing session, matching ADK, instead of raising.
The same call is unchanged in draft PR #39074.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]