Skip to content

Commit a71397d

Browse files
committed
Update
1 parent dd566a8 commit a71397d

3 files changed

Lines changed: 10 additions & 35 deletions

File tree

scripts/test_install_smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# (imports + any per-profile runtime checks). By default runs every
77
# known profile; pass a profile name to run just one.
88
#
9-
# Available profiles (must match those in tests/install_smoke/profiles.py):
9+
# Available profiles (must match those in tests/install_smoke/__main__.py):
1010
# base -- `pip install a2a-sdk`
1111
# http-server -- `pip install a2a-sdk[http-server]`
1212
# grpc -- `pip install a2a-sdk[grpc]`

tests/install_smoke/__main__.py

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
"""Entry point: ``python -m tests.install_smoke <profile>``.
2-
3-
Exit codes:
4-
0 - All imports and runtime checks for the profile succeeded.
5-
1 - One or more imports or runtime checks failed.
6-
7-
See README.md for design notes and how to add new runtime checks.
8-
"""
1+
"""Entry point for the install-smoke harness. See README.md."""
92

103
from __future__ import annotations
114

@@ -21,14 +14,10 @@
2114
from collections.abc import Callable
2215

2316

24-
# Core modules that MUST be importable with only base dependencies.
25-
# These are the public API surface that every user gets with
26-
# `pip install a2a-sdk` (no extras).
27-
#
28-
# Do NOT add modules here that require optional extras (grpc,
29-
# http-server, sql, signing, telemetry, vertex, etc.). Those modules
30-
# are expected to fail without their extras installed and should use
31-
# try/except ImportError guards internally.
17+
# Modules under each list MUST be importable with only that profile's
18+
# extras installed -- no leakage from other extras (grpc, http-server,
19+
# sql, signing, telemetry, vertex, etc.). Modules that require
20+
# optional extras must use try/except ImportError guards internally.
3221
CORE_MODULES = [
3322
'a2a',
3423
'a2a.client',
@@ -58,8 +47,6 @@
5847
'a2a.helpers.proto_helpers',
5948
]
6049

61-
# Modules that MUST be importable with only the base + `http-server`
62-
# extras installed (no `grpc`, `sql`, `signing`, `telemetry`, etc.).
6350
HTTP_SERVER_MODULES = [
6451
'a2a.server.routes',
6552
'a2a.server.routes.agent_card_routes',
@@ -70,23 +57,17 @@
7057
'a2a.server.routes.rest_routes',
7158
]
7259

73-
# Modules that MUST be importable with only the base + `grpc` extras
74-
# installed (no `http-server`, `sql`, `signing`, `telemetry`, etc.).
7560
GRPC_MODULES = [
7661
'a2a.server.request_handlers.grpc_handler',
7762
'a2a.client.transports.grpc',
7863
'a2a.compat.v0_3.grpc_handler',
7964
'a2a.compat.v0_3.grpc_transport',
8065
]
8166

82-
# Modules that MUST be importable with only the base + `telemetry`
83-
# extras installed.
8467
TELEMETRY_MODULES = [
8568
'a2a.utils.telemetry',
8669
]
8770

88-
# Modules that MUST be importable with only the base + `sql` extras
89-
# installed (covers postgresql/mysql/sqlite drivers via SQLAlchemy).
9071
SQL_MODULES = [
9172
'a2a.server.models',
9273
'a2a.server.tasks.database_task_store',
@@ -103,14 +84,6 @@
10384
}
10485

10586

106-
# Per-profile runtime exercises. Each callable raises on failure and
107-
# returns None on success. These run after the import smoke succeeds
108-
# and are meant to invoke real public-API code paths against the
109-
# dependency versions resolved at install time.
110-
#
111-
# To add a new check: drop a module under `tests.install_smoke.runtime`
112-
# exposing `NAME` and `check()`, then add a tuple here for the
113-
# profile(s) whose extras it needs. See README.md.
11487
RUNTIME_CHECKS: dict[str, list[tuple[str, Callable[[], None]]]] = {
11588
'base': [
11689
(base_send_message.NAME, base_send_message.check),

tests/install_smoke/runtime/base_send_message.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Drive DefaultRequestHandler.on_message_send end-to-end with no transport.
22
3-
Uses only base dependencies (no http-server / gRPC transport).
3+
Exercises the request-validation path that regressed in
4+
https://github.com/a2aproject/a2a-python/pull/1019: a real proto
5+
instance flows through `validate_proto_required_fields`, which broke
6+
on protobuf 7. Pure imports cannot catch this class of regression.
47
"""
58

69
from __future__ import annotations
@@ -84,5 +87,4 @@ async def _run() -> None:
8487

8588

8689
def check() -> None:
87-
"""Run the roundtrip; raises on failure."""
8890
asyncio.run(_run())

0 commit comments

Comments
 (0)