When you delete a relationship from a generic in the schema, the relationship does not get removed from the nodes in the schema that inherit from the generic.
Expected Behavior
The relationship would be removed from the nodes inheriting from the generic
Steps to Reproduce
start Infrahub instance
load this schema
---
version: "1.0"
generics:
- name: Generic
namespace: Infra
attributes:
- name: description
kind: Text
optional: true
relationships:
- name: other_thing
peer: InfraOtherThing
kind: Attribute
cardinality: one
optional: true
nodes:
- name: Thing
namespace: Infra
label: Thing
inherit_from:
- InfraGeneric
attributes:
- name: name
label: Name
kind: Text
optional: false
unique: true
- name: OtherThing
namespace: Infra
label: OtherThing
attributes:
- name: name
label: Name
kind: Text
optional: false
unique: true
once the schema is loaded, load this schema which removed the relationship from the generic
---
version: "1.0"
generics:
- name: Generic
namespace: Infra
attributes:
- name: description
kind: Text
optional: true
relationships:
- name: other_thing
peer: InfraOtherThing
kind: Attribute
state: absent
cardinality: one
optional: true
nodes:
- name: Thing
namespace: Infra
label: Thing
inherit_from:
- InfraGeneric
attributes:
- name: name
label: Name
kind: Text
optional: false
unique: true
- name: OtherThing
namespace: Infra
label: OtherThing
attributes:
- name: name
label: Name
kind: Text
optional: false
unique: true
check the schema of the generic, the relationship will have been removed
check the schema of the InfraThing node, the relationship will still exist
Tagged for 1.0.0 if possible, this is affecting a customer who has to work around cleaning up objects for now, and doesn’t want to have this part of his production deployments.
Component
API Server / GraphQL
Infrahub version
0.16.0.dev0
Current Behavior
When you delete a relationship from a generic in the schema, the relationship does not get removed from the nodes in the schema that inherit from the generic.
Expected Behavior
The relationship would be removed from the nodes inheriting from the generic
Steps to Reproduce
Additional Information
No response