fix(cli,memory): catch typer.Exit in actor CLIs and align SQLChatMessageHistory kwarg
CI / lint (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m18s
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 43s
CI / build (pull_request) Successful in 1m8s
CI / unit_tests (pull_request) Successful in 5m1s
CI / docker (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 10m27s
CI / coverage (pull_request) Successful in 12m6s
CI / status-check (pull_request) Successful in 3s
CI / lint (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 56s
CI / typecheck (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m18s
CI / push-validation (pull_request) Successful in 27s
CI / helm (pull_request) Successful in 43s
CI / build (pull_request) Successful in 1m8s
CI / unit_tests (pull_request) Successful in 5m1s
CI / docker (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 10m27s
CI / coverage (pull_request) Successful in 12m6s
CI / status-check (pull_request) Successful in 3s
The `agents actor run` and `actor_run` Typer commands wrapped their main
try/except around `_resolve_config_files` with a bare `except
click.exceptions.Exit: raise` clause to let resolver-raised exits
propagate cleanly. Modern Typer re-exports `typer.Exit` from its vendored
click (`typer._click.exceptions.Exit`), which is NOT a subclass of
`click.exceptions.Exit`. So `_resolve_config_files`'s
`raise typer.Exit(code=2)` for unknown-actor / no-config-data / bad-blob
cases fell through to the generic `except Exception` clause, which
re-raised as `typer.Exit(code=3)` and replaced the targeted stderr
("not found in registry") with a generic "Unexpected error" message.
Behave scenarios at `actor_run_signature.feature:38` and `:56` and three
Robot integration scenarios verified the original exit-code/message
contract and failed. Catch `(typer.Exit, click.exceptions.Exit)` instead.
The five errored scenarios in `actor_run_signature_resolve_steps.py` and
`actor_run_signature_security_steps.py` had the same root cause from the
test side: `except (SystemExit, click.exceptions.Exit)` could not catch
the raised `typer.Exit`. Widen the tuple to include `typer.Exit`.
memory_service.py's `SQLChatMessageHistory(connection_string=...)` call
broke against langchain-community 0.4.2: the keyword was renamed
`connection` (which now accepts a URL string OR an Engine). Update the
call site and refresh the local `typings/langchain_community/...`
pyright stub to match the upstream signature so typecheck stays clean.
ISSUES CLOSED: #10921
This commit is contained in:
@@ -6,8 +6,12 @@ class SQLChatMessageHistory:
|
||||
def __init__(
|
||||
self,
|
||||
session_id: str,
|
||||
connection_string: str,
|
||||
table_name: str = "message_history",
|
||||
table_name: str = "message_store",
|
||||
session_id_field_name: str = "session_id",
|
||||
custom_message_converter: Any | None = None,
|
||||
connection: Any | None = None,
|
||||
engine_args: dict[str, Any] | None = None,
|
||||
async_mode: bool | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def messages(self) -> list[Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user