wu-sheng opened a new pull request, #145:
URL: https://github.com/apache/skywalking-infra-e2e/pull/145

   ## Summary
   
   - Add `noDuplicates` template pipe function that verifies a list has no 
duplicate entries (full deep equality check)
   - Works with `contains`, `containsOnce`, and `range` via standard Go 
template pipe syntax: `(.metrics | noDuplicates)`
   - Resolves apache/skywalking#12253
   
   ## Usage
   
   ```yaml
   {{- contains (.metrics | noDuplicates) }}
   - name: {{ notEmpty .name }}
     value: {{ notEmpty .value }}
   {{- end }}
   ```
   
   When duplicates exist in actual data, verification fails with an error 
indicating the duplicated item.
   
   ## Changes
   
   | File | Change |
   |------|--------|
   | `internal/components/verifier/funcs.go` | Add `noDuplicates` function |
   | `internal/components/verifier/verifier_test.go` | 4 test cases |
   | `docs/en/setup/Configuration-File.md` | Document `noDuplicates` |
   
   ## Test plan
   
   - [x] All existing tests pass (no regression)
   - [x] `noDuplicates` passes when list has no duplicates (with `contains`)
   - [x] `noDuplicates` fails when list has duplicate items (with `contains`)
   - [x] `noDuplicates` fails with duplicates when used with `containsOnce`
   - [x] `noDuplicates` passes with `range` and no duplicates
   - [x] Lint passes
   - [x] Build passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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