You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/04/13 12:36:10 UTC

(skywalking) branch feat/containsOnce-metadata created (now 4912f0dd7a)

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

wusheng pushed a change to branch feat/containsOnce-metadata
in repository https://gitbox.apache.org/repos/asf/skywalking.git


      at 4912f0dd7a Use containsOnce for metadata e2e expected files

This branch includes the following new commits:

     new 4912f0dd7a Use containsOnce for metadata e2e expected files

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(skywalking) 01/01: Use containsOnce for metadata e2e expected files

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch feat/containsOnce-metadata
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit 4912f0dd7a2d8f6112651e2842ce735f4edd21d7
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Apr 13 20:35:58 2026 +0800

    Use containsOnce for metadata e2e expected files
    
    Migrate outer-level contains to containsOnce in service, instance,
    endpoint, and topology expected files (101 files). containsOnce uses
    backtracking for optimal 1:1 assignment between expected and actual
    entries, which is more precise for metadata where we know exactly
    which entries should exist.
    
    Inner nested contains (layers, tags, etc.) are left unchanged.
---
 test/e2e-v2/cases/activemq/expected/endpoint.yml                      | 2 +-
 test/e2e-v2/cases/activemq/expected/instance.yml                      | 2 +-
 test/e2e-v2/cases/activemq/expected/service.yml                       | 2 +-
 test/e2e-v2/cases/alarm/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/apisix/expected/instance.yml                        | 2 +-
 test/e2e-v2/cases/apisix/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/aws/api-gateway/expected/service.yml                | 2 +-
 test/e2e-v2/cases/aws/dynamodb/expected/service.yml                   | 2 +-
 test/e2e-v2/cases/aws/eks/expected/endpoint.yml                       | 2 +-
 test/e2e-v2/cases/aws/eks/expected/instance.yml                       | 2 +-
 test/e2e-v2/cases/aws/eks/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/aws/s3/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/cilium/expected/dependency-services.yml             | 4 ++--
 test/e2e-v2/cases/cilium/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/clickhouse/expected/service.yml                     | 2 +-
 test/e2e-v2/cases/cluster/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/elasticsearch/expected/endpoint.yml                 | 2 +-
 test/e2e-v2/cases/elasticsearch/expected/instance.yml                 | 2 +-
 test/e2e-v2/cases/elasticsearch/expected/service.yml                  | 2 +-
 test/e2e-v2/cases/envoy-ai-gateway/expected/service.yml               | 2 +-
 test/e2e-v2/cases/flink/expected/endpoint.yml                         | 2 +-
 test/e2e-v2/cases/flink/expected/instance.yml                         | 2 +-
 test/e2e-v2/cases/flink/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml   | 4 ++--
 test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml   | 4 ++--
 test/e2e-v2/cases/gateway/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/go/expected/dependency-services-go.yml              | 4 ++--
 test/e2e-v2/cases/go/expected/service.yml                             | 2 +-
 .../istio/als/expected/dependency-services-instance-productpage.yml   | 4 ++--
 .../cases/istio/als/expected/dependency-services-productpage.yml      | 4 ++--
 test/e2e-v2/cases/istio/als/expected/dependency-services-reviews.yml  | 4 ++--
 test/e2e-v2/cases/istio/als/expected/service.yml                      | 2 +-
 .../ambient-als/expected/dependency-services-instance-productpage.yml | 4 ++--
 test/e2e-v2/cases/istio/ambient-als/expected/service.yml              | 2 +-
 .../cases/istio/metrics/expected/dependency-services-productpage.yml  | 4 ++--
 test/e2e-v2/cases/istio/metrics/expected/service.yml                  | 2 +-
 test/e2e-v2/cases/kafka/kafka-monitoring/expected/instance.yml        | 2 +-
 test/e2e-v2/cases/kafka/kafka-monitoring/expected/service.yml         | 2 +-
 test/e2e-v2/cases/kafka/log/expected/service.yml                      | 2 +-
 test/e2e-v2/cases/kafka/meter/expected/service.yml                    | 2 +-
 test/e2e-v2/cases/kong/expected/service.yml                           | 2 +-
 test/e2e-v2/cases/log/expected/service.yml                            | 2 +-
 test/e2e-v2/cases/lua/expected/dependency-services.yml                | 4 ++--
 test/e2e-v2/cases/lua/expected/service.yml                            | 2 +-
 test/e2e-v2/cases/mariadb/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/menu/expected/service.yml                           | 2 +-
 test/e2e-v2/cases/meter/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/mongodb/expected/instance.yml                       | 2 +-
 test/e2e-v2/cases/mongodb/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/mysql/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/nginx/expected/service.yml                          | 2 +-
 .../cases/nodejs/expected/dependency-services-consumer-nodejs.yml     | 4 ++--
 test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml    | 4 ++--
 .../cases/nodejs/expected/dependency-services-provider-nodejs.yml     | 4 ++--
 test/e2e-v2/cases/nodejs/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/otlp-virtual-genai/expected/instance.yml            | 2 +-
 test/e2e-v2/cases/otlp-virtual-genai/expected/service.yml             | 2 +-
 test/e2e-v2/cases/php/expected/dependency-services-php.yml            | 4 ++--
 test/e2e-v2/cases/php/expected/dependency-services-provider.yml       | 4 ++--
 test/e2e-v2/cases/php/expected/service.yml                            | 2 +-
 test/e2e-v2/cases/postgresql/expected/service.yml                     | 2 +-
 test/e2e-v2/cases/profiling/async-profiler/expected/service.yml       | 2 +-
 .../cases/profiling/ebpf/access_log/expected/dependency-services.yml  | 4 ++--
 test/e2e-v2/cases/profiling/ebpf/access_log/expected/service.yml      | 2 +-
 test/e2e-v2/cases/profiling/ebpf/continuous/expected/instance.yml     | 2 +-
 test/e2e-v2/cases/profiling/ebpf/continuous/expected/service.yml      | 2 +-
 test/e2e-v2/cases/profiling/ebpf/network/expected/service.yml         | 2 +-
 test/e2e-v2/cases/profiling/ebpf/offcpu/expected/instance.yml         | 2 +-
 test/e2e-v2/cases/profiling/ebpf/offcpu/expected/service.yml          | 2 +-
 test/e2e-v2/cases/profiling/ebpf/oncpu/expected/instance.yml          | 2 +-
 test/e2e-v2/cases/profiling/ebpf/oncpu/expected/service.yml           | 2 +-
 test/e2e-v2/cases/profiling/pprof/expected/service.yml                | 2 +-
 test/e2e-v2/cases/profiling/trace/expected/service.yml                | 2 +-
 test/e2e-v2/cases/pulsar/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/python/expected/dependency-services-consumer-py.yml | 4 ++--
 test/e2e-v2/cases/python/expected/dependency-services-provider-py.yml | 4 ++--
 test/e2e-v2/cases/python/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/rabbitmq/expected/instance.yml                      | 2 +-
 test/e2e-v2/cases/rabbitmq/expected/service.yml                       | 2 +-
 test/e2e-v2/cases/redis/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/rocketmq/expected/endpoint.yml                      | 2 +-
 test/e2e-v2/cases/rocketmq/expected/instance.yml                      | 2 +-
 test/e2e-v2/cases/rocketmq/expected/service.yml                       | 2 +-
 test/e2e-v2/cases/rover/process/istio/expected/service.yml            | 2 +-
 .../cases/satellite/native-protocols/expected/dependency-services.yml | 4 ++--
 test/e2e-v2/cases/satellite/native-protocols/expected/service.yml     | 2 +-
 test/e2e-v2/cases/simple/expected/dependency-services-consumer.yml    | 4 ++--
 test/e2e-v2/cases/simple/expected/dependency-services-provider.yml    | 4 ++--
 test/e2e-v2/cases/simple/expected/service.yml                         | 2 +-
 test/e2e-v2/cases/so11y/expected/service.yml                          | 2 +-
 test/e2e-v2/cases/storage/expected/cold/dependency-services.yml       | 4 ++--
 test/e2e-v2/cases/storage/expected/dependency-services-consumer.yml   | 4 ++--
 test/e2e-v2/cases/storage/expected/dependency-services-provider.yml   | 4 ++--
 test/e2e-v2/cases/storage/expected/service.yml                        | 2 +-
 test/e2e-v2/cases/virtual-genai/expected/instance.yml                 | 2 +-
 test/e2e-v2/cases/virtual-genai/expected/service.yml                  | 2 +-
 test/e2e-v2/cases/virtual-mq/expected/service.yml                     | 2 +-
 test/e2e-v2/cases/vm/expected/service.yml                             | 2 +-
 test/e2e-v2/cases/win/expected/service.yml                            | 2 +-
 test/e2e-v2/cases/zipkin-virtual-genai/expected/instance.yml          | 2 +-
 test/e2e-v2/cases/zipkin-virtual-genai/expected/service.yml           | 2 +-
 101 files changed, 125 insertions(+), 125 deletions(-)

diff --git a/test/e2e-v2/cases/activemq/expected/endpoint.yml b/test/e2e-v2/cases/activemq/expected/endpoint.yml
index 3bb4fa2899..03509ec515 100644
--- a/test/e2e-v2/cases/activemq/expected/endpoint.yml
+++ b/test/e2e-v2/cases/activemq/expected/endpoint.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains .}}
+{{- containsOnce .}}
 - id: {{ b64enc "activemq::activemq-cluster" }}.1_{{ b64enc "testQueue" }}
   name: testQueue
 - id: {{ b64enc "activemq::activemq-cluster" }}.1_{{ b64enc "testTopic" }}
diff --git a/test/e2e-v2/cases/activemq/expected/instance.yml b/test/e2e-v2/cases/activemq/expected/instance.yml
index 65f5ee13a5..e5fe1de96a 100644
--- a/test/e2e-v2/cases/activemq/expected/instance.yml
+++ b/test/e2e-v2/cases/activemq/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: activemq-broker
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/activemq/expected/service.yml b/test/e2e-v2/cases/activemq/expected/service.yml
index 4264a84202..a29f58ae9f 100644
--- a/test/e2e-v2/cases/activemq/expected/service.yml
+++ b/test/e2e-v2/cases/activemq/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "activemq::activemq-cluster" }}.1
   name: activemq::activemq-cluster
   group: activemq
diff --git a/test/e2e-v2/cases/alarm/expected/service.yml b/test/e2e-v2/cases/alarm/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/alarm/expected/service.yml
+++ b/test/e2e-v2/cases/alarm/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/apisix/expected/instance.yml b/test/e2e-v2/cases/apisix/expected/instance.yml
index c5e0b2c0ef..05e59ae403 100644
--- a/test/e2e-v2/cases/apisix/expected/instance.yml
+++ b/test/e2e-v2/cases/apisix/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: {{ notEmpty .name }}
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/apisix/expected/service.yml b/test/e2e-v2/cases/apisix/expected/service.yml
index 1fca39e3a7..e6de6a07c4 100644
--- a/test/e2e-v2/cases/apisix/expected/service.yml
+++ b/test/e2e-v2/cases/apisix/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "APISIX::showcase-apisix-service" }}.1
   name: APISIX::showcase-apisix-service
   shortname: showcase-apisix-service
diff --git a/test/e2e-v2/cases/aws/api-gateway/expected/service.yml b/test/e2e-v2/cases/aws/api-gateway/expected/service.yml
index 22818cce2e..fee12e45c5 100644
--- a/test/e2e-v2/cases/aws/api-gateway/expected/service.yml
+++ b/test/e2e-v2/cases/aws/api-gateway/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "aws-api-gateway::$default:6m85d5acx7" }}.1
   name: "aws-api-gateway::$default:6m85d5acx7"
   group: aws-api-gateway
diff --git a/test/e2e-v2/cases/aws/dynamodb/expected/service.yml b/test/e2e-v2/cases/aws/dynamodb/expected/service.yml
index 1fe817b0be..d26da13777 100644
--- a/test/e2e-v2/cases/aws/dynamodb/expected/service.yml
+++ b/test/e2e-v2/cases/aws/dynamodb/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "aws-dynamodb::xxxxxxxx" }}.1
   name: aws-dynamodb::xxxxxxxx
   group: aws-dynamodb
diff --git a/test/e2e-v2/cases/aws/eks/expected/endpoint.yml b/test/e2e-v2/cases/aws/eks/expected/endpoint.yml
index 0197edc717..b6fc611943 100644
--- a/test/e2e-v2/cases/aws/eks/expected/endpoint.yml
+++ b/test/e2e-v2/cases/aws/eks/expected/endpoint.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains .}}
+{{- containsOnce .}}
 - id: {{ b64enc "aws-eks-cluster::SkyWalking" }}.1_{{ b64enc "kube-dns" }}
   name: kube-dns
 {{- end}}
diff --git a/test/e2e-v2/cases/aws/eks/expected/instance.yml b/test/e2e-v2/cases/aws/eks/expected/instance.yml
index 9864ca7830..badbfdb647 100644
--- a/test/e2e-v2/cases/aws/eks/expected/instance.yml
+++ b/test/e2e-v2/cases/aws/eks/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name:  ip-172-31-10-158.ap-northeast-1.compute.internal
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/aws/eks/expected/service.yml b/test/e2e-v2/cases/aws/eks/expected/service.yml
index 8fb6d10705..b14a425173 100644
--- a/test/e2e-v2/cases/aws/eks/expected/service.yml
+++ b/test/e2e-v2/cases/aws/eks/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "aws-eks-cluster::SkyWalking" }}.1
   name: aws-eks-cluster::SkyWalking
   group: aws-eks-cluster
diff --git a/test/e2e-v2/cases/aws/s3/expected/service.yml b/test/e2e-v2/cases/aws/s3/expected/service.yml
index f602117100..9571b42afa 100644
--- a/test/e2e-v2/cases/aws/s3/expected/service.yml
+++ b/test/e2e-v2/cases/aws/s3/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "aws-s3::skywalking" }}.1
   name: aws-s3::skywalking
   group: aws-s3
diff --git a/test/e2e-v2/cases/cilium/expected/dependency-services.yml b/test/e2e-v2/cases/cilium/expected/dependency-services.yml
index 6a8ef8acfa..95b171b6e3 100644
--- a/test/e2e-v2/cases/cilium/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/cilium/expected/dependency-services.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "productpage.default"}}.1
   name: productpage.default
   type: http
@@ -42,7 +42,7 @@ nodes:
     - CILIUM_SERVICE
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "productpage.default"}}.1
   sourcecomponents: []
   target: {{ b64enc "reviews.default"}}.1
diff --git a/test/e2e-v2/cases/cilium/expected/service.yml b/test/e2e-v2/cases/cilium/expected/service.yml
index f077bf3b93..b638921c8c 100644
--- a/test/e2e-v2/cases/cilium/expected/service.yml
+++ b/test/e2e-v2/cases/cilium/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "details.default" }}.1
   name: details.default
   group: ""
diff --git a/test/e2e-v2/cases/clickhouse/expected/service.yml b/test/e2e-v2/cases/clickhouse/expected/service.yml
index 03f364f1d6..18417d6b9d 100644
--- a/test/e2e-v2/cases/clickhouse/expected/service.yml
+++ b/test/e2e-v2/cases/clickhouse/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "clickhouse::clickhouse:8123" }}.1
   name: clickhouse::clickhouse:8123
   shortname: clickhouse:8123
diff --git a/test/e2e-v2/cases/cluster/expected/service.yml b/test/e2e-v2/cases/cluster/expected/service.yml
index 248534d1c3..c6bcd40e4e 100644
--- a/test/e2e-v2/cases/cluster/expected/service.yml
+++ b/test/e2e-v2/cases/cluster/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "test-service" }}.1
   name: test-service
   group: ""
diff --git a/test/e2e-v2/cases/elasticsearch/expected/endpoint.yml b/test/e2e-v2/cases/elasticsearch/expected/endpoint.yml
index c31a5a134c..0ca833e370 100644
--- a/test/e2e-v2/cases/elasticsearch/expected/endpoint.yml
+++ b/test/e2e-v2/cases/elasticsearch/expected/endpoint.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains .}}
+{{- containsOnce .}}
 - id: {{ b64enc "elasticsearch::cluster-e2e" }}.1_{{ b64enc "e2e-index-0" }}
   name: e2e-index-0
 {{- end}}
diff --git a/test/e2e-v2/cases/elasticsearch/expected/instance.yml b/test/e2e-v2/cases/elasticsearch/expected/instance.yml
index d9d74e1beb..58899b88ba 100644
--- a/test/e2e-v2/cases/elasticsearch/expected/instance.yml
+++ b/test/e2e-v2/cases/elasticsearch/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: node-e2e
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/elasticsearch/expected/service.yml b/test/e2e-v2/cases/elasticsearch/expected/service.yml
index 696f0faf13..996a2d0ac9 100644
--- a/test/e2e-v2/cases/elasticsearch/expected/service.yml
+++ b/test/e2e-v2/cases/elasticsearch/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "elasticsearch::cluster-e2e" }}.1
   name: elasticsearch::cluster-e2e
   group: elasticsearch
diff --git a/test/e2e-v2/cases/envoy-ai-gateway/expected/service.yml b/test/e2e-v2/cases/envoy-ai-gateway/expected/service.yml
index c97c7e2997..0ec8a934f6 100644
--- a/test/e2e-v2/cases/envoy-ai-gateway/expected/service.yml
+++ b/test/e2e-v2/cases/envoy-ai-gateway/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-ai-gateway" }}.1
   name: e2e-ai-gateway
   group: ""
diff --git a/test/e2e-v2/cases/flink/expected/endpoint.yml b/test/e2e-v2/cases/flink/expected/endpoint.yml
index 347f8c0dd9..d48d1f5f3d 100644
--- a/test/e2e-v2/cases/flink/expected/endpoint.yml
+++ b/test/e2e-v2/cases/flink/expected/endpoint.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains .}}
+{{- containsOnce .}}
 - id: {{ b64enc "flink::flink-cluster" }}.1_{{ b64enc "Windowed_Join_Example" }}
   name: Windowed_Join_Example
 {{- end}}
diff --git a/test/e2e-v2/cases/flink/expected/instance.yml b/test/e2e-v2/cases/flink/expected/instance.yml
index c2041deb7a..e97f5015fa 100644
--- a/test/e2e-v2/cases/flink/expected/instance.yml
+++ b/test/e2e-v2/cases/flink/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: taskmanager:9261
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/flink/expected/service.yml b/test/e2e-v2/cases/flink/expected/service.yml
index a521c6daea..1f70e1cd68 100644
--- a/test/e2e-v2/cases/flink/expected/service.yml
+++ b/test/e2e-v2/cases/flink/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "flink::flink-cluster" }}.1
   name: flink::flink-cluster
   group: flink
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml b/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml
index 86a5cf9c79..29ee6c25dc 100644
--- a/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml
+++ b/test/e2e-v2/cases/gateway/expected/dependency-services-consumer.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User" }}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - UNDEFINED
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer" }}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml b/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml
index 919df20ec1..1a4af824a6 100644
--- a/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml
+++ b/test/e2e-v2/cases/gateway/expected/dependency-services-provider.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   type: Tomcat
@@ -36,7 +36,7 @@ nodes:
     - VIRTUAL_DATABASE
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-provider" }}.1
   sourcecomponents:
     - h2-jdbc-driver
diff --git a/test/e2e-v2/cases/gateway/expected/service.yml b/test/e2e-v2/cases/gateway/expected/service.yml
index 8b2684e07d..1db46b22b6 100644
--- a/test/e2e-v2/cases/gateway/expected/service.yml
+++ b/test/e2e-v2/cases/gateway/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/go/expected/dependency-services-go.yml b/test/e2e-v2/cases/go/expected/dependency-services-go.yml
index 398f10d68a..1c12213479 100644
--- a/test/e2e-v2/cases/go/expected/dependency-services-go.yml
+++ b/test/e2e-v2/cases/go/expected/dependency-services-go.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
@@ -37,7 +37,7 @@ nodes:
     - SO11Y_GO_AGENT
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/go/expected/service.yml b/test/e2e-v2/cases/go/expected/service.yml
index 1f2c113136..4b603ea7aa 100644
--- a/test/e2e-v2/cases/go/expected/service.yml
+++ b/test/e2e-v2/cases/go/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "localhost:-1" }}.0
   name: localhost:-1
   group: ""
diff --git a/test/e2e-v2/cases/istio/als/expected/dependency-services-instance-productpage.yml b/test/e2e-v2/cases/istio/als/expected/dependency-services-instance-productpage.yml
index ed31a89787..05bb52ae90 100644
--- a/test/e2e-v2/cases/istio/als/expected/dependency-services-instance-productpage.yml
+++ b/test/e2e-v2/cases/istio/als/expected/dependency-services-instance-productpage.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ notEmpty .id }}
   name: {{ notEmpty .name }}
   serviceid: {{ b64enc "e2e::reviews" }}.1
@@ -30,7 +30,7 @@ nodes:
   isreal: true
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ notEmpty .source }}
   sourcecomponents: []
   target: {{ notEmpty .target }}
diff --git a/test/e2e-v2/cases/istio/als/expected/dependency-services-productpage.yml b/test/e2e-v2/cases/istio/als/expected/dependency-services-productpage.yml
index 07b003e876..abd325e0d3 100644
--- a/test/e2e-v2/cases/istio/als/expected/dependency-services-productpage.yml
+++ b/test/e2e-v2/cases/istio/als/expected/dependency-services-productpage.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e::reviews"}}.1
   name: e2e::reviews
   type: http
@@ -42,7 +42,7 @@ nodes:
     - MESH
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e::istio-ingressgateway"}}.1
   sourcecomponents:
     - http
diff --git a/test/e2e-v2/cases/istio/als/expected/dependency-services-reviews.yml b/test/e2e-v2/cases/istio/als/expected/dependency-services-reviews.yml
index 7dd6601945..bb67facc3e 100644
--- a/test/e2e-v2/cases/istio/als/expected/dependency-services-reviews.yml
+++ b/test/e2e-v2/cases/istio/als/expected/dependency-services-reviews.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e::reviews"}}.1
   name: e2e::reviews
   type: http
@@ -36,7 +36,7 @@ nodes:
     - MESH
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e::productpage"}}.1
   sourcecomponents:
     - http
diff --git a/test/e2e-v2/cases/istio/als/expected/service.yml b/test/e2e-v2/cases/istio/als/expected/service.yml
index 35aa6d7344..186bd89f83 100644
--- a/test/e2e-v2/cases/istio/als/expected/service.yml
+++ b/test/e2e-v2/cases/istio/als/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e::details" }}.1
   name: e2e::details
   group: "e2e"
diff --git a/test/e2e-v2/cases/istio/ambient-als/expected/dependency-services-instance-productpage.yml b/test/e2e-v2/cases/istio/ambient-als/expected/dependency-services-instance-productpage.yml
index 180cfc64e1..80a8b5a500 100644
--- a/test/e2e-v2/cases/istio/ambient-als/expected/dependency-services-instance-productpage.yml
+++ b/test/e2e-v2/cases/istio/ambient-als/expected/dependency-services-instance-productpage.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ notEmpty .id }}
   name: {{ notEmpty .name }}
   serviceid: {{ b64enc "reviews.default" }}.1
@@ -30,7 +30,7 @@ nodes:
   isreal: true
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ notEmpty .source }}
   sourcecomponents: []
   target: {{ notEmpty .target }}
diff --git a/test/e2e-v2/cases/istio/ambient-als/expected/service.yml b/test/e2e-v2/cases/istio/ambient-als/expected/service.yml
index f98b6e7778..c73c298d29 100644
--- a/test/e2e-v2/cases/istio/ambient-als/expected/service.yml
+++ b/test/e2e-v2/cases/istio/ambient-als/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "details.default" }}.1
   name: details.default
   group: ""
diff --git a/test/e2e-v2/cases/istio/metrics/expected/dependency-services-productpage.yml b/test/e2e-v2/cases/istio/metrics/expected/dependency-services-productpage.yml
index df160aa161..6261a8de2c 100644
--- a/test/e2e-v2/cases/istio/metrics/expected/dependency-services-productpage.yml
+++ b/test/e2e-v2/cases/istio/metrics/expected/dependency-services-productpage.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e::reviews"}}.1
   name: e2e::reviews
   type: null
@@ -42,7 +42,7 @@ nodes:
     - MESH_DP
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e::istio-ingressgateway"}}.1
   sourcecomponents:
     - Unknown
diff --git a/test/e2e-v2/cases/istio/metrics/expected/service.yml b/test/e2e-v2/cases/istio/metrics/expected/service.yml
index 7b3c8c353a..be4d337b3c 100644
--- a/test/e2e-v2/cases/istio/metrics/expected/service.yml
+++ b/test/e2e-v2/cases/istio/metrics/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e::istio-egressgateway" }}.1
   name: e2e::istio-egressgateway
   group: "e2e"
diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/expected/instance.yml b/test/e2e-v2/cases/kafka/kafka-monitoring/expected/instance.yml
index ef669d2d86..a3ce491952 100644
--- a/test/e2e-v2/cases/kafka/kafka-monitoring/expected/instance.yml
+++ b/test/e2e-v2/cases/kafka/kafka-monitoring/expected/instance.yml
@@ -12,7 +12,7 @@
 # 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.
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: broker1:7071
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/expected/service.yml b/test/e2e-v2/cases/kafka/kafka-monitoring/expected/service.yml
index 6427a9e8fe..e1acfbb310 100644
--- a/test/e2e-v2/cases/kafka/kafka-monitoring/expected/service.yml
+++ b/test/e2e-v2/cases/kafka/kafka-monitoring/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "kafka::kafka-cluster" }}.1
   name: kafka::kafka-cluster
   group: kafka
diff --git a/test/e2e-v2/cases/kafka/log/expected/service.yml b/test/e2e-v2/cases/kafka/log/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/kafka/log/expected/service.yml
+++ b/test/e2e-v2/cases/kafka/log/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/kafka/meter/expected/service.yml b/test/e2e-v2/cases/kafka/meter/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/kafka/meter/expected/service.yml
+++ b/test/e2e-v2/cases/kafka/meter/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/kong/expected/service.yml b/test/e2e-v2/cases/kong/expected/service.yml
index 8a4d7c6c52..032fc45364 100644
--- a/test/e2e-v2/cases/kong/expected/service.yml
+++ b/test/e2e-v2/cases/kong/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "kong::kong-cluster" }}.1
   name: kong::kong-cluster
   group: kong
diff --git a/test/e2e-v2/cases/log/expected/service.yml b/test/e2e-v2/cases/log/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/log/expected/service.yml
+++ b/test/e2e-v2/cases/log/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/lua/expected/dependency-services.yml b/test/e2e-v2/cases/lua/expected/dependency-services.yml
index 9ffa7ec554..c307c77632 100644
--- a/test/e2e-v2/cases/lua/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/lua/expected/dependency-services.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-entry-provider" }}.1
   name: e2e-service-entry-provider
   type: Tomcat
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-entry-provider" }}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/lua/expected/service.yml b/test/e2e-v2/cases/lua/expected/service.yml
index bca8efe209..736845eacb 100644
--- a/test/e2e-v2/cases/lua/expected/service.yml
+++ b/test/e2e-v2/cases/lua/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-entry-provider" }}.1
   name: e2e-service-entry-provider
   group: ""
diff --git a/test/e2e-v2/cases/mariadb/expected/service.yml b/test/e2e-v2/cases/mariadb/expected/service.yml
index ec661a68a6..f2cf4bd524 100644
--- a/test/e2e-v2/cases/mariadb/expected/service.yml
+++ b/test/e2e-v2/cases/mariadb/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "mysql::db" }}.1
   name: mysql::db
   shortname: db
diff --git a/test/e2e-v2/cases/menu/expected/service.yml b/test/e2e-v2/cases/menu/expected/service.yml
index 0143633bbb..bcf0138ae4 100644
--- a/test/e2e-v2/cases/menu/expected/service.yml
+++ b/test/e2e-v2/cases/menu/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/meter/expected/service.yml b/test/e2e-v2/cases/meter/expected/service.yml
index 7ae27c8244..260fc883f3 100644
--- a/test/e2e-v2/cases/meter/expected/service.yml
+++ b/test/e2e-v2/cases/meter/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "localhost:-1" }}.0
   name: localhost:-1
   group: ""
diff --git a/test/e2e-v2/cases/mongodb/expected/instance.yml b/test/e2e-v2/cases/mongodb/expected/instance.yml
index 3e82313740..1550e6f589 100644
--- a/test/e2e-v2/cases/mongodb/expected/instance.yml
+++ b/test/e2e-v2/cases/mongodb/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: mongodb-exporter-1:9216
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/mongodb/expected/service.yml b/test/e2e-v2/cases/mongodb/expected/service.yml
index 328499a74c..814421ba48 100644
--- a/test/e2e-v2/cases/mongodb/expected/service.yml
+++ b/test/e2e-v2/cases/mongodb/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "mongodb::replset" }}.1
   name: mongodb::replset
   group: mongodb
diff --git a/test/e2e-v2/cases/mysql/expected/service.yml b/test/e2e-v2/cases/mysql/expected/service.yml
index 4b2fb10958..b72d3d7b6c 100644
--- a/test/e2e-v2/cases/mysql/expected/service.yml
+++ b/test/e2e-v2/cases/mysql/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "mysql::root[root]" }}.1
   name: mysql::root[root]
   shortname: root[root]
diff --git a/test/e2e-v2/cases/nginx/expected/service.yml b/test/e2e-v2/cases/nginx/expected/service.yml
index 354d3687b7..1bff8a91ee 100644
--- a/test/e2e-v2/cases/nginx/expected/service.yml
+++ b/test/e2e-v2/cases/nginx/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "nginx::e2e-test" }}.1
   name: nginx::e2e-test
   group: nginx
diff --git a/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml b/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml
index 5ead942b79..f2574ddad5 100644
--- a/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml
+++ b/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer-nodejs.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User" }}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "consumer" }}.1
   sourcecomponents:
     - Axios
diff --git a/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml b/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml
index a1a031b2be..8bb310cc33 100644
--- a/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml
+++ b/test/e2e-v2/cases/nodejs/expected/dependency-services-consumer.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "provider" }}.1
   name: provider
   type: Express
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer" }}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml b/test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml
index b07094e3ec..62cce1500e 100644
--- a/test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml
+++ b/test/e2e-v2/cases/nodejs/expected/dependency-services-provider-nodejs.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "provider" }}.1
   name: provider
   type: Express
@@ -30,7 +30,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer" }}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/nodejs/expected/service.yml b/test/e2e-v2/cases/nodejs/expected/service.yml
index d47fdc8705..ca1b202d0d 100644
--- a/test/e2e-v2/cases/nodejs/expected/service.yml
+++ b/test/e2e-v2/cases/nodejs/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "consumer" }}.1
   name: consumer
   group: ""
diff --git a/test/e2e-v2/cases/otlp-virtual-genai/expected/instance.yml b/test/e2e-v2/cases/otlp-virtual-genai/expected/instance.yml
index f74704b2b8..774b696593 100644
--- a/test/e2e-v2/cases/otlp-virtual-genai/expected/instance.yml
+++ b/test/e2e-v2/cases/otlp-virtual-genai/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: gpt-4.1-mini-2025-04-14
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/otlp-virtual-genai/expected/service.yml b/test/e2e-v2/cases/otlp-virtual-genai/expected/service.yml
index 5471c7d596..af79a8dfa1 100644
--- a/test/e2e-v2/cases/otlp-virtual-genai/expected/service.yml
+++ b/test/e2e-v2/cases/otlp-virtual-genai/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "openai" }}.0
   name: openai
   group: ""
diff --git a/test/e2e-v2/cases/php/expected/dependency-services-php.yml b/test/e2e-v2/cases/php/expected/dependency-services-php.yml
index e376adc046..5f46a529b3 100644
--- a/test/e2e-v2/cases/php/expected/dependency-services-php.yml
+++ b/test/e2e-v2/cases/php/expected/dependency-services-php.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User" }}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "php" }}.1
   sourcecomponents:
     - cURL
diff --git a/test/e2e-v2/cases/php/expected/dependency-services-provider.yml b/test/e2e-v2/cases/php/expected/dependency-services-provider.yml
index 34743c8d69..7acca1b643 100644
--- a/test/e2e-v2/cases/php/expected/dependency-services-provider.yml
+++ b/test/e2e-v2/cases/php/expected/dependency-services-provider.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "php" }}.1
   sourcecomponents:
     - cURL
diff --git a/test/e2e-v2/cases/php/expected/service.yml b/test/e2e-v2/cases/php/expected/service.yml
index bb582abb04..57f56cf807 100644
--- a/test/e2e-v2/cases/php/expected/service.yml
+++ b/test/e2e-v2/cases/php/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/postgresql/expected/service.yml b/test/e2e-v2/cases/postgresql/expected/service.yml
index 634c5c286c..d0ecf69763 100644
--- a/test/e2e-v2/cases/postgresql/expected/service.yml
+++ b/test/e2e-v2/cases/postgresql/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "postgresql::postgres:5432" }}.1
   name: postgresql::postgres:5432
   shortname: postgres:5432
diff --git a/test/e2e-v2/cases/profiling/async-profiler/expected/service.yml b/test/e2e-v2/cases/profiling/async-profiler/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/profiling/async-profiler/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/async-profiler/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/profiling/ebpf/access_log/expected/dependency-services.yml b/test/e2e-v2/cases/profiling/ebpf/access_log/expected/dependency-services.yml
index b51fd8c0f1..52561d8758 100644
--- a/test/e2e-v2/cases/profiling/ebpf/access_log/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/access_log/expected/dependency-services.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "productpage.default"}}.1
   name: productpage.default
   type: http
@@ -42,7 +42,7 @@ nodes:
     - K8S_SERVICE
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "productpage.default"}}.1
   sourcecomponents:
   {{- contains .sourcecomponents }}
diff --git a/test/e2e-v2/cases/profiling/ebpf/access_log/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/access_log/expected/service.yml
index 872fbb60b4..42754a9d9d 100644
--- a/test/e2e-v2/cases/profiling/ebpf/access_log/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/access_log/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "details.default" }}.1
   name: details.default
   group: ""
diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/expected/instance.yml b/test/e2e-v2/cases/profiling/ebpf/continuous/expected/instance.yml
index 5f276502f7..5969c2c684 100644
--- a/test/e2e-v2/cases/profiling/ebpf/continuous/expected/instance.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/continuous/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
   name: test-instance
   attributes: []
diff --git a/test/e2e-v2/cases/profiling/ebpf/continuous/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/continuous/expected/service.yml
index 6929c68a77..8bb1f3c954 100644
--- a/test/e2e-v2/cases/profiling/ebpf/continuous/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/continuous/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "sqrt" }}.1
   name: sqrt
   group: ""
diff --git a/test/e2e-v2/cases/profiling/ebpf/network/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/network/expected/service.yml
index 7d8e19acea..2fe7072a60 100644
--- a/test/e2e-v2/cases/profiling/ebpf/network/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/network/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "nginx" }}.1
   name: nginx
   group: ""
diff --git a/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/instance.yml b/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/instance.yml
index b458a8a79b..709247cc92 100644
--- a/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/instance.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "file" }}.1_{{ b64enc "test-instance" }}
   name: test-instance
   attributes: []
diff --git a/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/service.yml
index 0470635b8f..2c14e668d4 100644
--- a/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/offcpu/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "file" }}.1
   name: file
   group: ""
diff --git a/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/instance.yml b/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/instance.yml
index 5f276502f7..5969c2c684 100644
--- a/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/instance.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
   name: test-instance
   attributes: []
diff --git a/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/service.yml
index 6929c68a77..8bb1f3c954 100644
--- a/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/ebpf/oncpu/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "sqrt" }}.1
   name: sqrt
   group: ""
diff --git a/test/e2e-v2/cases/profiling/pprof/expected/service.yml b/test/e2e-v2/cases/profiling/pprof/expected/service.yml
index 5744ee6c74..ce7ed28237 100644
--- a/test/e2e-v2/cases/profiling/pprof/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/pprof/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "go-service" }}.1
   name: go-service
   group: ""
diff --git a/test/e2e-v2/cases/profiling/trace/expected/service.yml b/test/e2e-v2/cases/profiling/trace/expected/service.yml
index 75d0916f00..3f3628606c 100644
--- a/test/e2e-v2/cases/profiling/trace/expected/service.yml
+++ b/test/e2e-v2/cases/profiling/trace/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/pulsar/expected/service.yml b/test/e2e-v2/cases/pulsar/expected/service.yml
index b51451cb43..4266c1f2af 100644
--- a/test/e2e-v2/cases/pulsar/expected/service.yml
+++ b/test/e2e-v2/cases/pulsar/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "pulsar::pulsar-cluster" }}.1
   name: pulsar::pulsar-cluster
   group: pulsar
diff --git a/test/e2e-v2/cases/python/expected/dependency-services-consumer-py.yml b/test/e2e-v2/cases/python/expected/dependency-services-consumer-py.yml
index e3510d6727..80657a2210 100644
--- a/test/e2e-v2/cases/python/expected/dependency-services-consumer-py.yml
+++ b/test/e2e-v2/cases/python/expected/dependency-services-consumer-py.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User"}}.0
   name: User
   type: USER
@@ -42,7 +42,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "User"}}.0
   sourcecomponents: []
   target: {{ b64enc "consumer-py"}}.1
diff --git a/test/e2e-v2/cases/python/expected/dependency-services-provider-py.yml b/test/e2e-v2/cases/python/expected/dependency-services-provider-py.yml
index 92135fb422..c2f1c4cd29 100644
--- a/test/e2e-v2/cases/python/expected/dependency-services-provider-py.yml
+++ b/test/e2e-v2/cases/python/expected/dependency-services-provider-py.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-consumer"}}.1
   name: e2e-service-consumer
   type: Tomcat
@@ -30,7 +30,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer" }}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/python/expected/service.yml b/test/e2e-v2/cases/python/expected/service.yml
index 2dba33c9a4..6c21cec683 100644
--- a/test/e2e-v2/cases/python/expected/service.yml
+++ b/test/e2e-v2/cases/python/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "provider-py" }}.1
   name: provider-py
   group: ""
diff --git a/test/e2e-v2/cases/rabbitmq/expected/instance.yml b/test/e2e-v2/cases/rabbitmq/expected/instance.yml
index 27fe61761a..0a02a287ef 100644
--- a/test/e2e-v2/cases/rabbitmq/expected/instance.yml
+++ b/test/e2e-v2/cases/rabbitmq/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: rmq0:15692
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/rabbitmq/expected/service.yml b/test/e2e-v2/cases/rabbitmq/expected/service.yml
index 6365b9e23a..d49acfb23e 100644
--- a/test/e2e-v2/cases/rabbitmq/expected/service.yml
+++ b/test/e2e-v2/cases/rabbitmq/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "rabbitmq::rabbitmq-cluster" }}.1
   name: rabbitmq::rabbitmq-cluster
   group: rabbitmq
diff --git a/test/e2e-v2/cases/redis/expected/service.yml b/test/e2e-v2/cases/redis/expected/service.yml
index 36174561c3..dc7679e60f 100644
--- a/test/e2e-v2/cases/redis/expected/service.yml
+++ b/test/e2e-v2/cases/redis/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "redis::root[root]" }}.1
   name: redis::root[root]
   shortname: root[root]
diff --git a/test/e2e-v2/cases/rocketmq/expected/endpoint.yml b/test/e2e-v2/cases/rocketmq/expected/endpoint.yml
index a85d8e989b..c2a8f1d270 100644
--- a/test/e2e-v2/cases/rocketmq/expected/endpoint.yml
+++ b/test/e2e-v2/cases/rocketmq/expected/endpoint.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains .}}
+{{- containsOnce .}}
 - id: {{ b64enc "rocketmq::rocketmq-cluster" }}.1_{{ b64enc "TopicTest" }}
   name: TopicTest
 {{- end}}
diff --git a/test/e2e-v2/cases/rocketmq/expected/instance.yml b/test/e2e-v2/cases/rocketmq/expected/instance.yml
index 5736faf1d5..cf07c38c76 100644
--- a/test/e2e-v2/cases/rocketmq/expected/instance.yml
+++ b/test/e2e-v2/cases/rocketmq/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: rocketmq-broker-1
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/rocketmq/expected/service.yml b/test/e2e-v2/cases/rocketmq/expected/service.yml
index 34a6e84aee..1b995a8339 100644
--- a/test/e2e-v2/cases/rocketmq/expected/service.yml
+++ b/test/e2e-v2/cases/rocketmq/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "rocketmq::rocketmq-cluster" }}.1
   name: rocketmq::rocketmq-cluster
   group: rocketmq
diff --git a/test/e2e-v2/cases/rover/process/istio/expected/service.yml b/test/e2e-v2/cases/rover/process/istio/expected/service.yml
index ee36888882..a8f7ea0da2 100644
--- a/test/e2e-v2/cases/rover/process/istio/expected/service.yml
+++ b/test/e2e-v2/cases/rover/process/istio/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "details.default" }}.1
   name: details.default
   group: ""
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
index 8660dde0d5..f9f9c4c2ea 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
@@ -30,7 +30,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
index 8b2684e07d..1db46b22b6 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/simple/expected/dependency-services-consumer.yml b/test/e2e-v2/cases/simple/expected/dependency-services-consumer.yml
index dd34c4214c..b25ff650b3 100644
--- a/test/e2e-v2/cases/simple/expected/dependency-services-consumer.yml
+++ b/test/e2e-v2/cases/simple/expected/dependency-services-consumer.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User"}}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/simple/expected/dependency-services-provider.yml b/test/e2e-v2/cases/simple/expected/dependency-services-provider.yml
index cea9b393c9..1f53a625c0 100644
--- a/test/e2e-v2/cases/simple/expected/dependency-services-provider.yml
+++ b/test/e2e-v2/cases/simple/expected/dependency-services-provider.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
@@ -36,7 +36,7 @@ nodes:
     - VIRTUAL_DATABASE
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/simple/expected/service.yml b/test/e2e-v2/cases/simple/expected/service.yml
index 0143633bbb..bcf0138ae4 100644
--- a/test/e2e-v2/cases/simple/expected/service.yml
+++ b/test/e2e-v2/cases/simple/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/so11y/expected/service.yml b/test/e2e-v2/cases/so11y/expected/service.yml
index ce07b50c8c..9e0e80b5bc 100644
--- a/test/e2e-v2/cases/so11y/expected/service.yml
+++ b/test/e2e-v2/cases/so11y/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/storage/expected/cold/dependency-services.yml b/test/e2e-v2/cases/storage/expected/cold/dependency-services.yml
index d2d62e1777..e64db786af 100644
--- a/test/e2e-v2/cases/storage/expected/cold/dependency-services.yml
+++ b/test/e2e-v2/cases/storage/expected/cold/dependency-services.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User"}}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "mock_a_service"}}.1
   sourcecomponents:
     - Dubbo
diff --git a/test/e2e-v2/cases/storage/expected/dependency-services-consumer.yml b/test/e2e-v2/cases/storage/expected/dependency-services-consumer.yml
index dd34c4214c..b25ff650b3 100644
--- a/test/e2e-v2/cases/storage/expected/dependency-services-consumer.yml
+++ b/test/e2e-v2/cases/storage/expected/dependency-services-consumer.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "User"}}.0
   name: User
   type: USER
@@ -36,7 +36,7 @@ nodes:
     - GENERAL
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/storage/expected/dependency-services-provider.yml b/test/e2e-v2/cases/storage/expected/dependency-services-provider.yml
index cea9b393c9..1f53a625c0 100644
--- a/test/e2e-v2/cases/storage/expected/dependency-services-provider.yml
+++ b/test/e2e-v2/cases/storage/expected/dependency-services-provider.yml
@@ -15,7 +15,7 @@
 
 debuggingtrace: null
 nodes:
-{{- contains .nodes }}
+{{- containsOnce .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
@@ -36,7 +36,7 @@ nodes:
     - VIRTUAL_DATABASE
 {{- end }}
 calls:
-{{- contains .calls }}
+{{- containsOnce .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents:
     - SpringRestTemplate
diff --git a/test/e2e-v2/cases/storage/expected/service.yml b/test/e2e-v2/cases/storage/expected/service.yml
index 8b2684e07d..1db46b22b6 100644
--- a/test/e2e-v2/cases/storage/expected/service.yml
+++ b/test/e2e-v2/cases/storage/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
diff --git a/test/e2e-v2/cases/virtual-genai/expected/instance.yml b/test/e2e-v2/cases/virtual-genai/expected/instance.yml
index f74704b2b8..774b696593 100644
--- a/test/e2e-v2/cases/virtual-genai/expected/instance.yml
+++ b/test/e2e-v2/cases/virtual-genai/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: gpt-4.1-mini-2025-04-14
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/virtual-genai/expected/service.yml b/test/e2e-v2/cases/virtual-genai/expected/service.yml
index 5471c7d596..af79a8dfa1 100644
--- a/test/e2e-v2/cases/virtual-genai/expected/service.yml
+++ b/test/e2e-v2/cases/virtual-genai/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "openai" }}.0
   name: openai
   group: ""
diff --git a/test/e2e-v2/cases/virtual-mq/expected/service.yml b/test/e2e-v2/cases/virtual-mq/expected/service.yml
index 19e16985c1..4017720cc4 100644
--- a/test/e2e-v2/cases/virtual-mq/expected/service.yml
+++ b/test/e2e-v2/cases/virtual-mq/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "kafka:9092" }}.0
   name: kafka:9092
   group: ""
diff --git a/test/e2e-v2/cases/vm/expected/service.yml b/test/e2e-v2/cases/vm/expected/service.yml
index d34ceca209..0663b691fe 100644
--- a/test/e2e-v2/cases/vm/expected/service.yml
+++ b/test/e2e-v2/cases/vm/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "vm-service" }}.1
   name: vm-service
   shortname: vm-service
diff --git a/test/e2e-v2/cases/win/expected/service.yml b/test/e2e-v2/cases/win/expected/service.yml
index a3aec14d8d..940f9201ae 100644
--- a/test/e2e-v2/cases/win/expected/service.yml
+++ b/test/e2e-v2/cases/win/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-  {{- contains . }}
+  {{- containsOnce . }}
 - id: {{ b64enc "10.211.55.3" }}.1
   name: 10.211.55.3
   group: ""
diff --git a/test/e2e-v2/cases/zipkin-virtual-genai/expected/instance.yml b/test/e2e-v2/cases/zipkin-virtual-genai/expected/instance.yml
index f74704b2b8..774b696593 100644
--- a/test/e2e-v2/cases/zipkin-virtual-genai/expected/instance.yml
+++ b/test/e2e-v2/cases/zipkin-virtual-genai/expected/instance.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ notEmpty .id }}
   name: gpt-4.1-mini-2025-04-14
   instanceuuid: {{ notEmpty .instanceuuid }}
diff --git a/test/e2e-v2/cases/zipkin-virtual-genai/expected/service.yml b/test/e2e-v2/cases/zipkin-virtual-genai/expected/service.yml
index 5471c7d596..af79a8dfa1 100644
--- a/test/e2e-v2/cases/zipkin-virtual-genai/expected/service.yml
+++ b/test/e2e-v2/cases/zipkin-virtual-genai/expected/service.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
+{{- containsOnce . }}
 - id: {{ b64enc "openai" }}.0
   name: openai
   group: ""