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: attribute kind of a node in a branch is not changed when the attribute kind was changed in main and you rebased the branch #5131

Open
wvandeun opened this issue Dec 3, 2024 · 0 comments
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 Dec 3, 2024

Component

API Server / GraphQL

Infrahub version

1.0.7 and stable

Current Behavior

You make a change to an attribute kind in the main branch. You have an older branch (pre attribute kind change in main), in which you want to get the same change, so you rebase the branch. After rebasing the change will not be relfected in the branch.

Expected Behavior

The attribute kind would have changed after rebasing the brach

Steps to Reproduce

  • load an instance of Infrahub
  • load this schema

version: "1.0"
nodes:
* name: Device
    namespace: Infra
    attributes:
* name: hostname
        kind: Text
        optional: false
* name: flash_size
        kind: Text
        optional: false
  • create a branch named test
  • in main load this schema (attribute kind for flash_size changes to Number)

version: "1.0"
nodes:
* name: Device
    namespace: Infra
    attributes:
* name: hostname
        kind: Text
        optional: false
* name: flash_size
        kind: Number
        optional: false
  • rebase the test branch
  • execute the following curl commands:
curl [http://localhost:8000/api/schema/InfraDevice?branch=test|http://localhost:8000/api/schema/InfraDevice?branch=test] | jq '.attributes[] | select(.name=="flash_size") | .kind'
curl [http://localhost:8000/api/schema/InfraDevice?branch=main|http://localhost:8000/api/schema/InfraDevice?branch=main] | jq '.attributes[] | select(.name=="flash_size") | .kind'
  • you will notice that test still reports the attribute kind to be Text, main will report a Number attribute kind
  • open a proposed change for the test branch
  • no schema diff will have been detected

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 Dec 3, 2024
@exalate-issue-sync exalate-issue-sync bot removed the group/backend Issue related to the backend (API Server, Git Agent) label Dec 3, 2024
@wvandeun wvandeun added the group/backend Issue related to the backend (API Server, Git Agent) label Dec 3, 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

1 participant