Copilot commented on code in PR #25:
URL: 
https://github.com/apache/skywalking-graalvm-distro/pull/25#discussion_r3034869029


##########
test/e2e/cases/virtual-genai/docker-compose.yml:
##########
@@ -0,0 +1,82 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+services:
+  banyandb:
+    extends:
+      file: 
../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml
+      service: banyandb
+    ports:
+      - 17912
+
+  oap:
+    image: skywalking-oap-native:latest
+    expose:
+      - 11800
+      - 12800
+    networks:
+      - e2e
+    ports:
+      - 12800
+    environment:
+      SW_HEALTH_CHECKER: default
+      SW_STORAGE_BANYANDB_TARGETS: banyandb:17912
+      SW_CONFIGURATION: none
+    depends_on:
+      banyandb:
+        condition: service_healthy
+    healthcheck:
+      test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  provider:
+    extends:
+      file: 
../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml
+      service: provider
+    depends_on:
+      oap:
+        condition: service_healthy
+
+  spring-ai-examples:
+    build:
+      context: ../../../../skywalking/test/e2e-v2/cases/virtual-genai
+      dockerfile: Dockerfile.provider
+      args:
+        - SW_AGENT_JDK_VERSION=17
+        - SW_AGENT_JAVA_COMMIT=${SW_AGENT_JAVA_COMMIT}
+    ports:
+      - 8080
+    networks:
+      - e2e
+    environment:
+      OPENAI_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Review Comment:
   `OPENAI_API_KEY` is set to a long placeholder string of `x` characters. For 
clarity (and to avoid any future secret-scanner false positives), consider 
using an explicit dummy value consistent with other tests (e.g., 
`"dummy-key-not-used"`) or wiring it via an env var with a default.
   ```suggestion
         OPENAI_API_KEY: dummy-key-not-used
   ```



##########
test/e2e/cases/envoy-ai-gateway/docker-compose.yml:
##########
@@ -0,0 +1,87 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+services:
+  banyandb:
+    extends:
+      file: 
../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml
+      service: banyandb
+    networks:
+      - e2e
+
+  oap:
+    image: skywalking-oap-native:latest
+    expose:
+      - 11800
+      - 12800
+    networks:
+      - e2e
+    ports:
+      - 12800
+    environment:
+      SW_HEALTH_CHECKER: default
+      SW_STORAGE_BANYANDB_TARGETS: banyandb:17912
+      SW_CONFIGURATION: none
+    depends_on:
+      banyandb:
+        condition: service_healthy
+    healthcheck:
+      test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  ollama:
+    image: ollama/ollama:0.6.2
+    networks:
+      - e2e
+    expose:
+      - 11434
+    healthcheck:
+      test: ["CMD", "ollama", "list"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  aigw:
+    image: envoyproxy/ai-gateway-cli:latest

Review Comment:
   `aigw` uses `envoyproxy/ai-gateway-cli:latest`, which is non-deterministic 
and can break CI/e2e as upstream images change over time. Please pin to a 
specific released tag (or a digest) and update it intentionally when syncing 
upstream/test fixtures, similar to how other e2e images are pinned.
   ```suggestion
       image: envoyproxy/ai-gateway-cli:v0.1.1
   ```



##########
test/e2e/cases/virtual-genai/e2e.yaml:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Virtual GenAI E2E — native OAP with BanyanDB
+# Validates GenAI provider/model metrics from Spring AI + SkyWalking Java 
agent.
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 20m
+  init-system-environment: ../../script/env
+  steps:
+    - name: set PATH
+      command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+    - name: install yq
+      command: bash 
skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+    - name: install swctl
+      command: bash 
skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+
+trigger:
+  action: http
+  interval: 3s
+  times: 5
+  url: http://${spring_ai_host}:${spring_ai_8080}/ai/generateStream

Review Comment:
   In this compose file the HTTP-trigger target service is 
`spring-ai-examples`, but the URL uses `${spring_ai_host}` / 
`${spring_ai_8080}`. The e2e framework derives these variables from the 
docker-compose service name (hyphens -> underscores), so this should likely 
reference `spring_ai_examples_host` / `spring_ai_examples_8080` (or rename the 
compose service to match). As-is, the trigger will resolve to empty/incorrect 
host/port and the test will fail to drive traffic.
   ```suggestion
     url: 
http://${spring_ai_examples_host}:${spring_ai_examples_8080}/ai/generateStream
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to