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: unable to remove a relationship to a generic from a schema extension when the generic is removed simulteanously #5384

Open
wvandeun opened this issue Jan 6, 2025 · 0 comments
Labels
group/backend Issue related to the backend (API Server, Git Agent) group/schema Issue related to some schemas type/bug Something isn't working as expected
Milestone

Comments

@wvandeun
Copy link
Contributor

wvandeun commented Jan 6, 2025

Component

API Server / GraphQL

Infrahub version

1.1.1

Current Behavior

When you try to delete a relationship from a schema extension, that references a generic that also gets removed during the same schema load, then the API server returns a HTTP404 status message without a proper error.
No additional logs seem to have been generated.

Expected Behavior

The generic is removed together with the relationship defined in the schema extension.

Steps to Reproduce

  • spin up instance of Infrahub
  • load these 2 schema files
---
version: "1.0"
nodes:
  - name: SomeNode
    namespace: Testing
    attributes:
      - name: name
        kind: Text
        optional: false
        unique: true
---
version: "1.0"
generics:
  - name: OtherNode
    namespace: Testing
    attributes:
      - name: name
        kind: Text
        optional: false
        unique: true
extensions:
  nodes:
    - kind: TestingSomeNode
      relationships:
        - name: other_nodes
          peer: TestingOtherNode
          optional: false
          cardinality: many
          kind: Attribute
  • then load the following schema file, removing the generic + the relationship defined on the extension
version: "1.0"
generics:
  - name: OtherNode
    namespace: Testing
    state: absent
    attributes:
      - name: name
        kind: Text
        optional: false
        unique: true
extensions:
  nodes:
    - kind: TestingSomeNode
      relationships:
        - name: other_nodes
          peer: TestingOtherNode
          state: absent
          optional: false
          cardinality: many
          kind: Attribute

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 Jan 6, 2025
@dgarros dgarros added the group/schema Issue related to some schemas label Jan 7, 2025
@dgarros dgarros added this to the Backlog milestone Jan 7, 2025
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) group/schema Issue related to some schemas type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants