|
|
Testing ADK Agent SDK Version Upgrades and Backward Compatibility
Author: Venkata Sudhakar
ADK SDK upgrades can silently break agent behavior if tool signatures, session contracts, or runner APIs change between versions. ShopMax India pins the ADK version in production and runs a backward-compatibility test suite before every upgrade so that agents handling product search and order management in Delhi and Chennai keep working as expected.
The compatibility test strategy involves capturing reference outputs from the pinned version, then replaying the same inputs against the candidate version and diffing the results. Key areas to check are FunctionTool argument schema, Runner.run() return shape, and InMemorySessionService state keys. Any structural change in these APIs is a breaking change that requires a migration step.
The example below defines a contract test that asserts the tool response schema and session state keys match a known-good baseline, simulating the check run in CI before merging an ADK version bump PR.
It gives the following output,
Session contract OK for session compat-test-001
2 passed in 0.14s
Add these contract tests to a dedicated compatibility/ directory and run them as a pre-merge gate on every ADK bump PR. If a test fails, check the ADK changelog for deprecation notices and update the migration guide before merging. Freeze the baseline snapshot in a JSON file so that future version bumps can be diffed automatically without manual inspection.
|
|