Copilot commented on code in PR #255:
URL: 
https://github.com/apache/skywalking-satellite/pull/255#discussion_r3278556189


##########
test/e2e/base/base-compose.yml:
##########
@@ -26,12 +26,13 @@ services:
       - e2e
     restart: on-failure
     environment:
-      SW_STORAGE: h2
+      SW_STORAGE: banyandb
+      SW_STORAGE_BANYANDB_TARGETS: banyandb:17912
       SW_CLUSTER_ZK_HOST_PORT: zk:2181

Review Comment:
   `oap` is now configured to use BanyanDB (`SW_STORAGE: banyandb` + 
`SW_STORAGE_BANYANDB_TARGETS`) and also depends on a `banyandb` service. 
However, most E2E case docker-compose files that `extends` this `oap` service 
(e.g. `test/e2e/case/native-ebpf/docker-compose.yml`, 
`native-asyncprofiler/docker-compose.yml`, 
`native-protocols/docker-compose.yml`) do not define/extend a `banyandb` 
service, which will make `docker-compose` fail due to an undefined dependency 
and/or make OAP unable to start. Either keep the base `oap` storage config 
unchanged and override it only in the `native-pprof` case, or update all E2E 
compose files that extend `oap` to include a `banyandb` service definition (and 
matching `depends_on`).



##########
test/e2e/base/base-compose.yml:
##########
@@ -41,6 +42,23 @@ services:
       interval: 5s
       timeout: 60s
       retries: 120
+    depends_on:
+      banyandb:
+        condition: service_healthy

Review Comment:
   The new `depends_on: banyandb` on `oap` requires every compose file that 
extends this `oap` service to also define/extend a `banyandb` service; 
otherwise compose will error with an undefined service dependency. Please 
either remove this from the shared base compose (and make it case-specific), or 
add the corresponding `banyandb` service to all E2E case compose files that 
extend `oap`.
   



##########
test/e2e/base/go-provider/main.go:
##########
@@ -0,0 +1,62 @@
+// Licensed to 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. Apache Software Foundation (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.
+
+package main
+
+import (
+       "log"
+       "time"
+
+       "github.com/gin-gonic/gin"
+
+       _ "github.com/apache/skywalking-go"
+)
+
+func main() {
+       // Keep the runtime busy so CPU profile sampling captures observable 
stacks.
+       go func() {
+               for {
+                       doWork()
+                       time.Sleep(50 * time.Millisecond)
+               }
+       }()

Review Comment:
   This background goroutine runs `doWork()` (10s busy-loop) in an infinite 
loop with only a 50ms sleep, which will keep the container at ~100% CPU 
continuously and can slow/flakify CI runners. Consider reducing the workload 
(shorter duration / fewer iterations), adding a longer sleep, or making the CPU 
load conditional (e.g., only when profiling is active) while still keeping 
enough activity for pprof sampling.



-- 
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