Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: when inserting a schema node into an existing hierarchy the peer of the parent relationship of the new node's child does not get updated #4839

Closed
wvandeun opened this issue Nov 3, 2024 · 0 comments
Assignees
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected

Comments

@wvandeun
Copy link
Contributor

wvandeun commented Nov 3, 2024

Component

API Server / GraphQL

Infrahub version

1.0.1

Current Behavior

When you insert a new schema node into an existing hierarchy, the parent relationship peer property of the node that points to the newly inserted schema node will not have been updated.

Expected Behavior

The peer property of the parent relationship points to the new parent, which is the newly inserted node in the hierarchy.

Steps to Reproduce

  • load an instance of Infrahub
  • load the following schema
---
version: "1.0"
generics:
  - name: Generic
    namespace: Location
    hierarchical: true
    attributes:
      - name: name
        kind: Text
        optional: false
        unique: true
nodes:
  - namespace: Location
    name: Country
    inherit_from:
      - LocationGeneric
    parent: ""
    children: "LocationSite"
  - namespace: Location
    name: Site
    inherit_from:
      - LocationGeneric
    parent: "LocationCountry"
    children: ""
  • next load the following schema
---
version: "1.0"
generics:
  - name: Generic
    namespace: Location
    hierarchical: true
    attributes:
      - name: name
        kind: Text
        optional: false
        unique: true
nodes:
  - namespace: Location
    name: Country
    inherit_from:
      - LocationGeneric
    parent: ""
    children: "LocationMetro"
  - namespace: Location
    name: Metro
    inherit_from:
      - LocationGeneric
    parent: "LocationCountry"
    children: "LocationSite"
  - namespace: Location
    name: Site
    inherit_from:
      - LocationGeneric
    parent: "LocationMetro"
    children: ""
  • in the UI navigate to schema
  • open the LocationSite schema node
  • go to relationships tab
  • expand the parent relation
  • the peer of the relationship is still set to LocationCountry

Additional Information

No response

@wvandeun wvandeun added type/bug Something isn't working as expected group/backend Issue related to the backend (API Server, Git Agent) labels Nov 3, 2024
@dgarros dgarros added this to the Infrahub - 1.0.x milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants