@@ -14,7 +14,7 @@ cleanup() {
1414 docker stop itk-service > /dev/null 2>&1 || true
1515 docker rm itk-service > /dev/null 2>&1 || true
1616 docker rmi itk_service > /dev/null 2>&1 || true
17- rm -rf a2a-samples > /dev/null 2>&1 || true
17+ rm -rf a2a-itk > /dev/null 2>&1 || true
1818 rm -rf pyproto > /dev/null 2>&1 || true
1919 rm -f instruction.proto > /dev/null 2>&1 || true
2020 echo " Done. Final exit code: $RESULT "
@@ -23,24 +23,24 @@ cleanup() {
2323# Register cleanup function to run on script exit
2424trap cleanup EXIT
2525
26- # 1. Pull a2a-samples and checkout revision
27- : " ${A2A_SAMPLES_REVISION :? A2A_SAMPLES_REVISION environment variable must be set} "
26+ # 1. Pull a2a-itk and checkout revision
27+ : " ${A2A_ITK_REVISION :? A2A_ITK_REVISION environment variable must be set} "
2828
29- if [ ! -d " a2a-samples " ]; then
30- git clone https://github.com/a2aproject/a2a-samples .git a2a-samples
29+ if [ ! -d " a2a-itk " ]; then
30+ git clone https://github.com/a2aproject/a2a-itk .git a2a-itk
3131fi
32- cd a2a-samples
32+ cd a2a-itk
3333git fetch origin
34- git checkout " $A2A_SAMPLES_REVISION "
34+ git checkout " $A2A_ITK_REVISION "
3535
3636# Only pull if it's a branch (not a detached HEAD)
3737if git symbolic-ref -q HEAD > /dev/null; then
38- git pull origin " $A2A_SAMPLES_REVISION "
38+ git pull origin " $A2A_ITK_REVISION "
3939fi
4040cd ..
4141
42- # 2. Copy instruction.proto from a2a-samples
43- cp a2a-samples/ itk/protos/instruction.proto ./instruction.proto
42+ # 2. Copy instruction.proto from a2a-itk
43+ cp a2a-itk/protos/instruction.proto ./instruction.proto
4444
4545# 3. Build pyproto library
4646mkdir -p pyproto
@@ -54,9 +54,9 @@ uv run --with grpcio-tools python -m grpc_tools.protoc \
5454# Fix imports in generated file
5555sed -i ' s/^import instruction_pb2 as instruction__pb2/from . import instruction_pb2 as instruction__pb2/' pyproto/instruction_pb2_grpc.py
5656
57- # 4. Build jit itk_service docker image from root of a2a-samples/ itk
58- # We run docker build from the itk directory inside a2a-samples
59- docker build -t itk_service a2a-samples/ itk
57+ # 4. Build jit itk_service docker image from root of a2a-itk
58+ # We run docker build from the root directory of a2a-itk
59+ docker build -t itk_service a2a-itk
6060
6161# 5. Start docker service
6262# Mounting a2a-python as repo and itk as current agent
@@ -109,86 +109,28 @@ if ! curl -s http://127.0.0.1:8000/ > /dev/null; then
109109 exit 1
110110fi
111111
112- echo " ITK Service is up! Sending compatibility test request..."
112+ SCENARIO_FILE=" scenarios.json"
113+ if [ " ${ITK_NIGHTLY_RUN^^} " = " TRUE" ]; then
114+ SCENARIO_FILE=" scenarios_full.json"
115+ fi
116+
117+ echo " ITK Service is up! Sending compatibility test request using $SCENARIO_FILE ..."
113118RESPONSE=$( curl -s -X POST http://127.0.0.1:8000/run \
114119 -H " Content-Type: application/json" \
115- -d ' {
116- "tests": [
117- {
118- "name": "Star Topology (Full) - JSONRPC & GRPC",
119- "sdks": ["current", "python_v10", "python_v03", "go_v10", "go_v03"],
120- "traversal": "euler",
121- "edges": ["0->1", "0->2", "0->3", "0->4", "1->0", "2->0", "3->0", "4->0"],
122- "protocols": ["jsonrpc", "grpc"],
123- "behavior": "send_message"
124- },
125- {
126- "name": "Star Topology (No Go v03) - HTTP_JSON",
127- "sdks": ["current", "python_v10", "python_v03", "go_v10"],
128- "traversal": "euler",
129- "edges": ["0->1", "0->2", "0->3", "1->0", "2->0", "3->0"],
130- "protocols": ["http_json"],
131- "behavior": "send_message"
132- },
133- {
134- "name": "Star Topology (Full) - JSONRPC & GRPC (Streaming)",
135- "sdks": ["current", "python_v10", "python_v03", "go_v10", "go_v03"],
136- "traversal": "euler",
137- "edges": ["0->1", "0->2", "0->3", "0->4", "1->0", "2->0", "3->0", "4->0"],
138- "protocols": ["jsonrpc", "grpc"],
139- "streaming": true,
140- "behavior": "send_message"
141- },
142- {
143- "name": "Star Topology (No Go v03) - HTTP_JSON (Streaming)",
144- "sdks": ["current", "python_v10", "python_v03", "go_v10"],
145- "traversal": "euler",
146- "edges": ["0->1", "0->2", "0->3", "1->0", "2->0", "3->0"],
147- "protocols": ["http_json"],
148- "streaming": true,
149- "behavior": "send_message"
150- },
151- {
152- "name": "Push Notification Test - JSONRPC & GRPC",
153- "sdks": ["current", "python_v10", "python_v03", "go_v03"],
154- "traversal": "euler",
155- "edges": ["0->1", "0->2", "0->3", "1->0", "2->0", "3->0"],
156- "protocols": ["jsonrpc", "grpc"],
157- "behavior": "push_notification"
158- },
159- {
160- "name": "Push Notification Test - HTTP_JSON",
161- "sdks": ["current", "python_v10", "python_v03"],
162- "traversal": "euler",
163- "edges": ["0->1", "0->2", "1->0", "2->0"],
164- "protocols": ["http_json"],
165- "behavior": "push_notification"
166- },
167- {
168- "name": "Resubscribe Test - JSONRPC",
169- "sdks": ["current", "python_v10", "python_v03", "go_v10", "go_v03"],
170- "traversal": "euler",
171- "edges": ["0->1", "0->2", "0->3", "0->4", "1->0", "2->0", "3->0", "4->0"],
172- "protocols": ["jsonrpc"],
173- "streaming": true,
174- "behavior": "resubscribe"
175- },
176- {
177- "name": "Resubscribe Test - Python & Go Non-JSONRPC Protocols",
178- "sdks": ["current", "python_v10", "python_v03", "go_v10"],
179- "traversal": "euler",
180- "edges": ["0->1", "0->2", "0->3", "1->0", "2->0", "3->0"],
181- "protocols": ["grpc", "http_json"],
182- "streaming": true,
183- "behavior": "resubscribe"
184- }
185- ]
186- }' )
187-
188- echo " --------------------------------------------------------"
189- echo " ITK TEST RESULTS:"
190- echo " --------------------------------------------------------"
191- echo " $RESPONSE " | python3 -c "
120+ -d " @$SCENARIO_FILE " )
121+
122+ if [ " ${ITK_NIGHTLY_RUN^^} " = " TRUE" ]; then
123+ echo " Nightly run detected. Saving raw results and running process_results.py..."
124+ echo " $RESPONSE " > raw_results.json
125+ python3 a2a-itk/scripts/process_results.py \
126+ --history_output_file itk_python.json \
127+ --history_url https://github.com/a2aproject/a2a-python/releases/download/nightly-metrics/itk_python.json
128+ RESULT=$?
129+ else
130+ echo " --------------------------------------------------------"
131+ echo " ITK TEST RESULTS:"
132+ echo " --------------------------------------------------------"
133+ echo " $RESPONSE " | python3 -c "
192134import sys, json
193135try:
194136 data = json.load(sys.stdin)
@@ -206,7 +148,8 @@ except Exception as e:
206148 print(f'Raw response: {data if \" data\" in locals() else \" no data\" }')
207149 sys.exit(1)
208150"
209- RESULT=$?
151+ RESULT=$?
152+ fi
210153set -e
211154
212155if [ $RESULT -ne 0 ]; then
0 commit comments