-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
type/bugSomething isn't working as expectedSomething isn't working as expected
Description
Component
No response
Infrahub version
1.5.1
Current Behavior
Currently if there is an attribute of kind List that has a regex applied the we evaluate the regex at the input level per item in the list however during a merge/rebase/schema update the regex is applied against the whole list as a string instead of per item in the list. Preventing the data from being merged.
schema:
- name: ports
kind: List
label: Ports
optional: true
description: "List of ports or port ranges (e.g., 'tcp:80', 'tcp:21-22', 'tcp:53', 'udp:53')"
regex: "^(tcp|udp):[\\d-]+$"
Expected Behavior
To evaluate the regex against all the items in the list individually.
Steps to Reproduce
Add the above attribute to a device node in the dev dataset https://github.com/opsmill/infrahub/blob/stable/models/base/dcim.yml
Add some data to the node: tcp:443 tcp:8080 in a new branch
Try to merge the branch
Additional Information
No response
Metadata
Metadata
Assignees
Labels
type/bugSomething isn't working as expectedSomething isn't working as expected