Component
API Server / GraphQL
Infrahub version
1.5.4
Current Behavior
I use the name of my object as a HFID. It's unique and computed as jinja2 attribute.
However under certain circumstances it seems that this name could be duplicated and so my hfid as well, leading to various issues down the line.
Expected Behavior
I expect the application to refuse the data before it reaches the database.
Steps to Reproduce
---
version: "1.0"
nodes:
- name: Stuff
namespace: Random
display_label: name__value
human_friendly_id:
- name__value
attributes:
- name: name
kind: Text
computed_attribute:
kind: Jinja2
jinja2_template: "{{ description__value | upper }}-STUFF"
read_only: true
unique: true
optional: false
- name: description
kind: Text
- Then load the following object file
---
apiVersion: infrahub.app/v1
kind: Object
spec:
kind: RandomStuff
data:
- description: DESCRIPTION
- description: DESCRIPTION
- description: DESCRIPTION
- description: DESCRIPTION
-> This will still create 4 objects, all with the same name even tho it should be unique
Additional Information
No response
Component
API Server / GraphQL
Infrahub version
1.5.4
Current Behavior
I use the name of my object as a HFID. It's unique and computed as jinja2 attribute.
However under certain circumstances it seems that this name could be duplicated and so my hfid as well, leading to various issues down the line.
Expected Behavior
I expect the application to refuse the data before it reaches the database.
Steps to Reproduce
-> This will still create 4 objects, all with the same name even tho it should be unique
Additional Information
No response