This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git

commit 94487e6338dae3c3980723163cd7686fe2c4e46c
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Nov 2 11:54:32 2026 +0100

    ai-benchmark: an infra entry may name its implementation, as camel infra 
run aws s3 takes it
    
    The harness passed each infra entry as one argument. LocalStack-style AWS
    needs the implementation after the alias: camel infra run aws s3. An entry
    such as "aws s3" is now split into words for camel infra run, and camel
    infra get and stop get the alias (aws) only, as they know the service by
    it. The runner stops the services by their alias as well.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF
---
 ai-benchmark/README.md              |  3 ++-
 ai-benchmark/agent_mcp_stepwise.py  | 11 +++++++----
 ai-benchmark/run-stepwise-ladder.sh |  3 ++-
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ai-benchmark/README.md b/ai-benchmark/README.md
index ab1e830..95030b0 100644
--- a/ai-benchmark/README.md
+++ b/ai-benchmark/README.md
@@ -167,7 +167,8 @@ pass, which rewrites that example's steps file and resets 
its project, so each p
 - `peer`: a second app the example talks to, started with `camel run 
--source-dir` before the model's app and stopped
   after it. `contracts-openapi-client` calls the stock API in 
`seed/_peer-openapi-server` on port 8080.
 - `infra`: services started with `camel infra run` (the sql rung's Postgres); 
they stay up across the passes of a run
-  and are stopped when the run is over. Docker must be running.
+  and are stopped when the run is over. Docker must be running. An entry may 
name the implementation after the alias,
+  as `camel infra run` takes it: `aws s3` (`camel infra get` and `stop` use 
the alias).
 - `infra_seed`: `{service: folder under seed/}` for a service that serves 
files. The embedded SFTP server of
   `camel infra run sftp` serves the folder it was started in, so the harness 
copies the folder to
   `stepwise/<tag>/<name>/infra-<service>/` and starts the service there, a 
fresh copy in every pass
diff --git a/ai-benchmark/agent_mcp_stepwise.py 
b/ai-benchmark/agent_mcp_stepwise.py
index 4f1b6e7..727f688 100755
--- a/ai-benchmark/agent_mcp_stepwise.py
+++ b/ai-benchmark/agent_mcp_stepwise.py
@@ -203,24 +203,27 @@ def infra_start(services, seeds=None):
 
     seeds: {service: folder under seed/} for a service that serves files 
(sftp): the folder is copied to infra-<svc>/
     in the pass's output folder, and the service is started in it, so it 
serves a fresh copy in every pass.
+
+    A service may name its implementation after the alias, as camel infra run 
takes it: "aws s3" runs
+    `camel infra run aws s3`; camel infra get and stop know the service by its 
alias (aws) only.
     """
     seeds = seeds or {}
     for svc in services:
-        subprocess.run(["camel", "infra", "stop", svc], check=False,
+        subprocess.run(["camel", "infra", "stop", svc.split()[0]], check=False,
                        stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
     for svc in services:
         cwd = HERE
         if seeds.get(svc):
-            cwd = os.path.join(OUT, "infra-" + svc)
+            cwd = os.path.join(OUT, "infra-" + svc.replace(" ", "-"))
             shutil.rmtree(cwd, ignore_errors=True)
             shutil.copytree(os.path.join(HERE, "seed", seeds[svc]), cwd)
             INFRA_HOME[svc] = cwd
-        subprocess.run(["camel", "infra", "run", svc, "--background"], 
check=False, cwd=cwd,
+        subprocess.run(["camel", "infra", "run"] + svc.split() + 
["--background"], check=False, cwd=cwd,
                        stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
     data, deadline = {}, time.time() + INFRA_TIMEOUT
     for svc in services:
         while time.time() < deadline:
-            out = subprocess.run(["camel", "infra", "get", svc, "--json"], 
capture_output=True, text=True).stdout
+            out = subprocess.run(["camel", "infra", "get", svc.split()[0], 
"--json"], capture_output=True, text=True).stdout
             m = re.search(r"\{.*\}", out, re.S)
             if m:
                 try:
diff --git a/ai-benchmark/run-stepwise-ladder.sh 
b/ai-benchmark/run-stepwise-ladder.sh
index 4a486c5..63774a2 100755
--- a/ai-benchmark/run-stepwise-ladder.sh
+++ b/ai-benchmark/run-stepwise-ladder.sh
@@ -35,7 +35,8 @@ for i in $(seq 1 "$K"); do
 import glob, json, os
 out = set()
 for f in glob.glob(os.environ.get('BENCH_STEPS_DIR', 'steps-ladder') + 
'/*.json'):
-    try: out.update(json.load(open(f)).get('infra') or [])
+    # an entry may name the implementation (aws s3): camel infra stop takes 
the alias
+    try: out.update(s.split()[0] for s in json.load(open(f)).get('infra') or 
[])
     except Exception: pass
 print(' '.join(sorted(out)))"); do camel infra stop "$svc" > /dev/null 2>&1 || 
true; done
   echo "[$T] DONE $(date +%T)" | tee -a "stepwise-$T.log"

Reply via email to