adk-upgrade-check 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adk_upgrade_check-0.2.1/.gitignore +5 -0
- adk_upgrade_check-0.2.1/LICENSE +202 -0
- adk_upgrade_check-0.2.1/PKG-INFO +263 -0
- adk_upgrade_check-0.2.1/README.md +235 -0
- adk_upgrade_check-0.2.1/pyproject.toml +55 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/__init__.py +3 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/__main__.py +4 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/cli.py +177 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/config_files.py +83 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/engine.py +386 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/fixes.py +92 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/model.py +40 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/report.py +130 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/__init__.py +29 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk119_async_db_url.py +181 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk119_sqlite_service.py +53 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk200_direct_append.py +72 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk200_event_schema.py +67 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk206_artifact_ns.py +38 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk207_pyarrow_extra.py +68 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk213_otel_semconv.py +91 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk214_enum_args.py +525 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk214_vertex_session_kwargs.py +81 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk215_builder_removed.py +72 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/adk215_mcp_prompt_args.py +42 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/rules/base.py +94 -0
- adk_upgrade_check-0.2.1/src/adk_upgrade_check/versions.py +109 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/fixed/deploy/.env +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/fixed/deploy/app.py +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/fixed/deploy/k8s/deployment.yaml +7 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/fixed/deploy/run.sh +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/fixed/urls.py +14 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/negative/async_urls.py +10 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/negative/deploy_ok/.env +2 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/negative/deploy_ok/app.py +7 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/negative/deploy_ok/run.sh +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/positive/deploy/.env +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/positive/deploy/app.py +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/positive/deploy/k8s/deployment.yaml +7 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/positive/deploy/run.sh +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-ASYNC-DB-URL/positive/urls.py +14 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-SQLITE-SERVICE/negative/cli_ok/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-SQLITE-SERVICE/negative/cli_ok/run.sh +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-SQLITE-SERVICE/positive/cli/.env +1 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK119-SQLITE-SERVICE/positive/cli/run.sh +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-DIRECT-APPEND/negative/a2a_queue.py +6 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-DIRECT-APPEND/negative/session_service.py +16 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-DIRECT-APPEND/positive/append.py +14 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-EVENT-SCHEMA/negative/blob.py +15 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-EVENT-SCHEMA/negative/wrapper.py +13 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK200-EVENT-SCHEMA/positive/columns.py +11 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK206-ARTIFACT-NS/negative/artifacts.py +4 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK206-ARTIFACT-NS/positive/artifacts.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/fixed/pyproject/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/fixed/pyproject/pyproject.toml +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/fixed/requirements/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/fixed/requirements/requirements.txt +2 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/already_extra/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/already_extra/requirements.txt +1 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/direct_pyarrow/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/direct_pyarrow/requirements.txt +2 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/no_plugin/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/negative/no_plugin/requirements.txt +1 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/positive/pyproject/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/positive/pyproject/pyproject.toml +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/positive/requirements/app.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK207-PYARROW-EXTRA/positive/requirements/requirements.txt +2 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/negative/opted_in/.env +1 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/negative/opted_in/traces.py +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/negative/tests_only/tests/test_converter.py +6 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/negative/unrelated.py +3 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/positive/dashboards/alerts.yaml +4 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK213-OTEL-SEMCONV/positive/dashboards/traces.py +5 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-ENUM-ARGS/fixed/compare.py +24 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-ENUM-ARGS/negative/not_adk.py +14 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-ENUM-ARGS/negative/safe_uses.py +45 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-ENUM-ARGS/positive/compare.py +24 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-ENUM-ARGS/positive/many_uses.py +47 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-VERTEX-SESSION-KWARGS/fixed/sessions.py +19 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-VERTEX-SESSION-KWARGS/negative/not_vertex.py +7 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-VERTEX-SESSION-KWARGS/negative/sessions.py +12 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK214-VERTEX-SESSION-KWARGS/positive/sessions.py +19 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK215-BUILDER-REMOVED/negative/web.py +9 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK215-BUILDER-REMOVED/positive/builder.py +13 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK215-MCP-PROMPT-ARGS/negative/provider.py +8 -0
- adk_upgrade_check-0.2.1/tests/fixtures/ADK215-MCP-PROMPT-ARGS/positive/provider.py +15 -0
- adk_upgrade_check-0.2.1/tests/ground_truth/async_db_url.py +19 -0
- adk_upgrade_check-0.2.1/tests/ground_truth/enum_args.py +42 -0
- adk_upgrade_check-0.2.1/tests/ground_truth/removals.py +42 -0
- adk_upgrade_check-0.2.1/tests/ground_truth/run_override.py +61 -0
- adk_upgrade_check-0.2.1/tests/ground_truth/sqlite_cli_switch.py +35 -0
- adk_upgrade_check-0.2.1/tests/test_engine.py +252 -0
- adk_upgrade_check-0.2.1/tests/test_fixtures.py +91 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: adk-upgrade-check
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Find code that a Google ADK (google-adk) upgrade will break, before you upgrade.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Reuben-Alex/adk-upgrade-check
|
|
6
|
+
Project-URL: Issues, https://github.com/Reuben-Alex/adk-upgrade-check/issues
|
|
7
|
+
Project-URL: Releases, https://github.com/Reuben-Alex/adk-upgrade-check/releases
|
|
8
|
+
Author: Reuben Alex
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: adk,agent-development-kit,ai-agents,breaking-changes,codemod,google-adk,libcst,migration,static-analysis,upgrade
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Topic :: Software Development :: Testing
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: libcst>=1.4
|
|
25
|
+
Requires-Dist: packaging>=23
|
|
26
|
+
Requires-Dist: pyyaml>=6
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
# adk-upgrade-check
|
|
32
|
+
|
|
33
|
+
**Find the code a [Google ADK](https://github.com/google/adk-python) upgrade will break, before you upgrade.**
|
|
34
|
+
|
|
35
|
+
[](https://github.com/Reuben-Alex/adk-upgrade-check/actions/workflows/ci.yml)
|
|
36
|
+
[](pyproject.toml)
|
|
37
|
+
[](#rules)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
|
|
40
|
+
<img src="https://raw.githubusercontent.com/Reuben-Alex/adk-upgrade-check/main/docs/demo.svg" alt="adk-upgrade-check reporting four breaking changes in a demo ADK project" width="860">
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
`google-adk` ships breaking changes in minor releases, and some of them aren't labelled as breaking.
|
|
45
|
+
`adk-upgrade-check` reads your project, works out which ADK version you're on, and points to the
|
|
46
|
+
exact lines that the target release breaks. Each finding names the release that caused it, links the
|
|
47
|
+
upstream change and says how to fix it. With `--fix`, it rewrites the mechanical cases.
|
|
48
|
+
|
|
49
|
+
- **Static and offline.** It parses your code with [LibCST](https://github.com/Instagram/LibCST)
|
|
50
|
+
and never imports or runs it. No API keys, no LLM calls, and no need to install the target ADK.
|
|
51
|
+
- **Version-aware.** It reads your current version from `uv.lock`, `poetry.lock`, `pdm.lock`,
|
|
52
|
+
`requirements*.txt` or `pyproject.toml`, and runs only the rules for releases you are crossing.
|
|
53
|
+
- **Checked against real releases.** Every rule is tested on the `google-adk` versions either side
|
|
54
|
+
of the change it detects ([ground truth](#accuracy)).
|
|
55
|
+
- **Low noise.** Each finding is `certain` or `likely`, and only `certain` findings fail CI by
|
|
56
|
+
default.
|
|
57
|
+
- **Built for CI.** Exit codes, JSON, SARIF for GitHub code scanning, a GitHub Action and a
|
|
58
|
+
pre-commit hook.
|
|
59
|
+
|
|
60
|
+
## Quick start
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Run it once, without installing (needs uv: https://docs.astral.sh/uv/)
|
|
64
|
+
uvx --from git+https://github.com/Reuben-Alex/adk-upgrade-check adk-upgrade-check .
|
|
65
|
+
|
|
66
|
+
# Or install it
|
|
67
|
+
pipx install git+https://github.com/Reuben-Alex/adk-upgrade-check
|
|
68
|
+
adk-upgrade-check path/to/your/agent --to 2.15.1
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Apply the safe rewrites. The tool shows the diff first, and refuses to run on uncommitted changes:
|
|
72
|
+
|
|
73
|
+
```diff
|
|
74
|
+
$ adk-upgrade-check . --fix
|
|
75
|
+
--- a/billing/tools.py
|
|
76
|
+
+++ b/billing/tools.py
|
|
77
|
+
@@ -5,7 +5,7 @@
|
|
78
|
+
def get_price(plan: Plan, seats: int = 1) -> dict:
|
|
79
|
+
"""Returns the monthly price for a plan."""
|
|
80
|
+
- if plan == "free":
|
|
81
|
+
+ if plan == Plan.FREE:
|
|
82
|
+
return {"plan": plan.value, "price": 0}
|
|
83
|
+
- per_seat = 20 if plan == "pro" else 15
|
|
84
|
+
+ per_seat = 20 if plan == Plan.PRO else 15
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Rules
|
|
88
|
+
|
|
89
|
+
A rule runs when your current version is older than the release that introduced the change and the
|
|
90
|
+
target version is at least that release: `--from < release <= --to`. Run
|
|
91
|
+
`adk-upgrade-check explain <RULE_ID>` for the details of any rule.
|
|
92
|
+
|
|
93
|
+
| Rule | Release | What breaks | Auto-fix |
|
|
94
|
+
|---|---|---|---|
|
|
95
|
+
| [`ADK119-ASYNC-DB-URL`](src/adk_upgrade_check/rules/adk119_async_db_url.py) | 1.19.0 | A synchronous DB URL (`sqlite:///`, `postgresql://`, `+psycopg2`, `mysql+pymysql`…) given to `DatabaseSessionService` fails at startup. The rule checks code, the `.env` files and deploy manifests that set the URL, and `--session_service_uri` flags. The changelog listed this as a feature, not a breaking change. | ✅ |
|
|
96
|
+
| [`ADK119-SQLITE-SERVICE`](src/adk_upgrade_check/rules/adk119_sqlite_service.py) | 1.19.0 | `adk web` / `adk api_server --session_service_uri sqlite:///…` switches to `SqliteSessionService`, which refuses a database written by 1.18 or earlier until it is migrated. Not in the changelog's breaking changes. | |
|
|
97
|
+
| [`ADK200-DIRECT-APPEND`](src/adk_upgrade_check/rules/adk200_direct_append.py) | 2.0.0 | `ctx.session.events.append(event)` bypasses the 2.0 event pipeline, so the event is never persisted, routed or streamed. | |
|
|
98
|
+
| [`ADK200-EVENT-SCHEMA`](src/adk_upgrade_check/rules/adk200_event_schema.py) | 2.0.0 | A custom `BaseSessionService` that maps events to fixed columns breaks on the new `node_info` and `output` fields. | |
|
|
99
|
+
| [`ADK206-ARTIFACT-NS`](src/adk_upgrade_check/rules/adk206_artifact_ns.py) | 2.6.0 | `FileArtifactService` moves artifacts to a per-app path. The next save of an existing artifact restarts its version numbering. | |
|
|
100
|
+
| [`ADK207-PYARROW-EXTRA`](src/adk_upgrade_check/rules/adk207_pyarrow_extra.py) | 2.7.0 | `BigQueryAgentAnalyticsPlugin` with `google-adk[gcp]` fails to import, because pyarrow moved to the `bigquery-analytics` extra. | ✅ |
|
|
101
|
+
| [`ADK213-OTEL-SEMCONV`](src/adk_upgrade_check/rules/adk213_otel_semconv.py) | 2.13.0 | Dashboards, exporters and queries that read the `call_llm` span go empty under the new default OTel GenAI v2 schema. | |
|
|
102
|
+
| [`ADK214-ENUM-ARGS`](src/adk_upgrade_check/rules/adk214_enum_args.py) | 2.14.0 | Enum tool arguments arrive as members, not strings, so `plan == "pro"`, `d[plan]`, `match`, `json.dumps` and `str` methods all change behaviour. Follows tools across modules, re-exports and `tools=ALL_TOOLS` lists. | ✅ |
|
|
103
|
+
| [`ADK214-VERTEX-SESSION-KWARGS`](src/adk_upgrade_check/rules/adk214_vertex_session_kwargs.py) | 2.14.0 | `VertexAiSessionService.create_session(session_state=..., sessionId=..., ...)` raises `ValueError`. | ✅ |
|
|
104
|
+
| [`ADK215-BUILDER-REMOVED`](src/adk_upgrade_check/rules/adk215_builder_removed.py) | 2.15.0 | `google.adk.cli.built_in_agents` and the `/dev/apps/{app}/builder*` routes are gone. | |
|
|
105
|
+
| [`ADK215-MCP-PROMPT-ARGS`](src/adk_upgrade_check/rules/adk215_mcp_prompt_args.py) | 2.15.0 | `McpInstructionProvider` no longer fills prompt arguments from `session.state`. | |
|
|
106
|
+
|
|
107
|
+
## Use it in CI
|
|
108
|
+
|
|
109
|
+
The most useful moment to run it is on the pull request that bumps `google-adk`: Dependabot,
|
|
110
|
+
Renovate or your own.
|
|
111
|
+
|
|
112
|
+
**GitHub Action**, with findings in the Security tab through code scanning:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
# .github/workflows/adk-upgrade-check.yml
|
|
116
|
+
on:
|
|
117
|
+
pull_request:
|
|
118
|
+
paths: ["pyproject.toml", "uv.lock", "requirements*.txt", "**/*.py"]
|
|
119
|
+
|
|
120
|
+
jobs:
|
|
121
|
+
adk-upgrade-check:
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
permissions:
|
|
124
|
+
contents: read
|
|
125
|
+
security-events: write
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/checkout@v4
|
|
128
|
+
- uses: Reuben-Alex/adk-upgrade-check@v0.2.0
|
|
129
|
+
with:
|
|
130
|
+
to: latest
|
|
131
|
+
sarif: adk-upgrade-check.sarif
|
|
132
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
133
|
+
if: always()
|
|
134
|
+
with:
|
|
135
|
+
sarif_file: adk-upgrade-check.sarif
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**pre-commit:**
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
repos:
|
|
142
|
+
- repo: https://github.com/Reuben-Alex/adk-upgrade-check
|
|
143
|
+
rev: v0.2.0
|
|
144
|
+
hooks:
|
|
145
|
+
- id: adk-upgrade-check
|
|
146
|
+
args: ["--to", "latest"]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
<details>
|
|
150
|
+
<summary><b>All options</b></summary>
|
|
151
|
+
|
|
152
|
+
| Option | Meaning |
|
|
153
|
+
|---|---|
|
|
154
|
+
| `PATH` | Project root. Default: `.` |
|
|
155
|
+
| `--from VERSION` | Your current `google-adk`. Default: detected from lock files and requirements. |
|
|
156
|
+
| `--to VERSION` | The version you're upgrading to, or `latest`. Default: `2.15.1`, the newest release the rules cover. |
|
|
157
|
+
| `--format text\|json\|sarif` | Output format. |
|
|
158
|
+
| `--fail-on error\|warning\|info\|never` | Lowest severity that exits 1. Default: `error`. |
|
|
159
|
+
| `--strict` | Let `likely` findings fail the run too. |
|
|
160
|
+
| `--fix` | Apply auto-fixes, printing the diff first. Refuses on uncommitted changes. |
|
|
161
|
+
| `--force` | With `--fix`: run without a clean git tree. |
|
|
162
|
+
| `--rule ID` | Run only this rule (repeatable). |
|
|
163
|
+
| `--exclude GLOB` | Skip matching paths (repeatable). |
|
|
164
|
+
| `--color auto\|always\|never` | Colour the text output. Honours `NO_COLOR`. |
|
|
165
|
+
|
|
166
|
+
Exit codes: `0` nothing at or above `--fail-on`, `1` findings, `2` usage error.
|
|
167
|
+
|
|
168
|
+
Subcommands: `adk-upgrade-check list-rules` and `adk-upgrade-check explain <RULE_ID>`.
|
|
169
|
+
|
|
170
|
+
</details>
|
|
171
|
+
|
|
172
|
+
## How it works
|
|
173
|
+
|
|
174
|
+
```mermaid
|
|
175
|
+
flowchart LR
|
|
176
|
+
A[Your project] --> B[Detect current version<br/>uv.lock · poetry.lock · requirements]
|
|
177
|
+
B --> C[Select rules<br/>from < release ≤ to]
|
|
178
|
+
A --> D[Parse with LibCST<br/>never imported or run]
|
|
179
|
+
D --> E[Resolve names<br/>imports · re-exports · tool lists]
|
|
180
|
+
C --> F[Run rules]
|
|
181
|
+
E --> F
|
|
182
|
+
F --> G[text · JSON · SARIF]
|
|
183
|
+
F --> H[--fix: diff, then rewrite]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
- **Name resolution, not text search.** `from google.adk.tools import FunctionTool as FT` and
|
|
187
|
+
`import google.adk.sessions as s` both resolve to the real ADK symbol, so look-alike names from
|
|
188
|
+
other libraries don't match.
|
|
189
|
+
- **Cross-file analysis.** For the Enum rule, the tool finds which functions are tools by following
|
|
190
|
+
`Agent(tools=[...])` and `FunctionTool(fn)` through imports, package re-exports, shared
|
|
191
|
+
`ALL_TOOLS` lists, methods (`self.lookup`, `billing.lookup`), Agent Config YAML
|
|
192
|
+
(`tools: - name: my_agent.tools.get_price`) and monorepo layouts. It then checks how those
|
|
193
|
+
functions use their Enum parameters.
|
|
194
|
+
- **Beyond Python.** Database URLs are followed from the code that reads them (`os.environ["X"]`)
|
|
195
|
+
into `.env` files, Dockerfiles, docker-compose, Kubernetes manifests and shell scripts. The checker
|
|
196
|
+
also reads `--session_service_uri` flags in deploy scripts, including `$VAR` references.
|
|
197
|
+
- **Fast.** Only files that mention `google.adk` are parsed up front. Everything else is parsed on
|
|
198
|
+
demand, when an import resolves to it. google/adk-samples (1,956 files) takes about 14 seconds.
|
|
199
|
+
- **Formatting-preserving fixes.** Fixes are applied as text edits at exact source positions, so
|
|
200
|
+
comments, quotes and line endings are left as they were.
|
|
201
|
+
|
|
202
|
+
## Accuracy
|
|
203
|
+
|
|
204
|
+
**Ground truth.** [`tests/ground_truth/`](tests/ground_truth) reproduces each break on real
|
|
205
|
+
releases:
|
|
206
|
+
|
|
207
|
+
| Rule | Before | After |
|
|
208
|
+
|---|---|---|
|
|
209
|
+
| ADK119-ASYNC-DB-URL | 1.18.0: `sqlite:///` works | 1.19.0: `ValueError`, while `sqlite+aiosqlite:///` works |
|
|
210
|
+
| ADK119-SQLITE-SERVICE | 1.18.0: CLI `sqlite:///` writes sessions with `DatabaseSessionService` | 1.19.0 and 2.15.1: `RuntimeError: … seems to use an old schema. Please run the migration command` |
|
|
211
|
+
| ADK207-PYARROW-EXTRA | 2.6.3 `[gcp]`: plugin and pyarrow import | 2.7.0 `[gcp]`: `ImportError: pyarrow is required` |
|
|
212
|
+
| ADK214-ENUM-ARGS | 2.13.0: the tool (a function or a bound method) gets `str`, and `plan == "pro"` is `True` | 2.14.0: it gets `Plan`, and `plan == "pro"` is `False` |
|
|
213
|
+
| ADK214-VERTEX-SESSION-KWARGS | 2.13.0: `session_state=` is accepted | 2.14.0: `ValueError: Unsupported create_session option(s)` |
|
|
214
|
+
| ADK215-BUILDER-REMOVED | 2.14.1: `google.adk.cli.built_in_agents` imports | 2.15.0: `ModuleNotFoundError` |
|
|
215
|
+
|
|
216
|
+
Rules are only shipped when the break reproduces. The 2.0 notes say overridden `_run_async_impl`
|
|
217
|
+
methods are bypassed, but on the `Runner` path they still run in 1.39.1, 2.0.0 and 2.15.1
|
|
218
|
+
([`run_override.py`](tests/ground_truth/run_override.py)). So there is no rule for that, because it
|
|
219
|
+
would flag working code.
|
|
220
|
+
|
|
221
|
+
**Real projects.** All rules were forced on (`--from 1.0.0`) across
|
|
222
|
+
[google/adk-samples](https://github.com/google/adk-samples) and 22 public ADK projects found through
|
|
223
|
+
GitHub code search, and every finding was labelled by hand:
|
|
224
|
+
|
|
225
|
+
| Rule | Findings | Real breaks | Notes |
|
|
226
|
+
|---|---:|---:|---|
|
|
227
|
+
| ADK119-ASYNC-DB-URL | 9 | 9 | 7 repos; two are pinned to exactly 1.18.0. |
|
|
228
|
+
| ADK119-SQLITE-SERVICE | 2 | 2 | `likely`. Both scripts break on upgrade, but through the repo's own CLI wrapper, which raises the async-driver error rather than the schema error. |
|
|
229
|
+
| ADK213-OTEL-SEMCONV | 3 | 2 | `likely`. The other one already handles both schemas. |
|
|
230
|
+
| ADK215-MCP-PROMPT-ARGS | 1 | 0 | `likely`. The prompts take no arguments. |
|
|
231
|
+
| The other seven rules | 0 | – | No noise. Of 461 tool functions found (7 of them methods), one had an Enum parameter, and it was used safely. |
|
|
232
|
+
|
|
233
|
+
Every `certain` finding was a real break. The two wrong findings are both `likely`, so neither would
|
|
234
|
+
fail a CI run by default.
|
|
235
|
+
|
|
236
|
+
## Limitations
|
|
237
|
+
|
|
238
|
+
- Tool lists built at runtime (`self.tools.append(...)`, list comprehensions, plugin registries) and
|
|
239
|
+
methods inherited from a base class aren't followed.
|
|
240
|
+
- In Kubernetes manifests, a `--session_service_uri` flag is read from the line it appears on, so a
|
|
241
|
+
`command:`/`args:` split over several YAML lines is only partly understood.
|
|
242
|
+
- Env vars are matched by name across the whole project. A variable set differently per environment
|
|
243
|
+
is checked in every file that sets it.
|
|
244
|
+
- The checker reports what your code will hit. It doesn't migrate session data: for that, use
|
|
245
|
+
`adk migrate session`.
|
|
246
|
+
|
|
247
|
+
## Roadmap
|
|
248
|
+
|
|
249
|
+
- More rules for the 2.x behaviour changes, and generated rules for every `DeprecationWarning` site.
|
|
250
|
+
- A semi-automated rule pipeline: watch PyPI for new releases, diff the tagged sources and
|
|
251
|
+
changelog, draft a rule with fixtures, gate it on ground truth and the corpus, then review it by
|
|
252
|
+
hand.
|
|
253
|
+
- A read-only database preflight that compares your live session schema with what the target
|
|
254
|
+
release expects.
|
|
255
|
+
|
|
256
|
+
## Contributing
|
|
257
|
+
|
|
258
|
+
Rules are small and self-contained, and each one comes with fixtures and a ground-truth check. See
|
|
259
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for how to add one.
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
[Apache-2.0](LICENSE). This is an independent project, not affiliated with or endorsed by Google.
|