wu-sheng commented on issue #12253:
URL: https://github.com/apache/skywalking/issues/12253#issuecomment-4240111027

   The `noDuplicates` pipe function has been implemented in 
apache/skywalking-infra-e2e#145.
   
   It can be used with `contains`, `containsOnce`, or `range` via standard Go 
template pipe syntax:
   
   ```yaml
   {{- contains (.metrics | noDuplicates) }}
   - name: {{ notEmpty .name }}
     value: {{ notEmpty .value }}
   {{- end }}
   ```
   
   When the actual data contains duplicate entries (full deep equality), 
verification will fail with an error indicating the duplicated item.
   
   This PR also builds on top of two earlier fixes:
   - apache/skywalking-infra-e2e#143 — fixed `contains` to enforce distinct 
matching (each actual item can only satisfy one expected entry), and added 
`containsOnce` with backtracking for optimal assignment.


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