opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
212 stars 18 forks source link

bug: Changes on cardinality=many relationship on both branches causes incomplete merge operations #901

Closed ogenstad closed 1 year ago

ogenstad commented 1 year ago

Component

API Server / GraphQL

Current Behavior

Performing a merge operation when both branches have changed the same cardinality=many relationship and added peers results to an incomplete merge operation where the added peer from the other branch (i.e. not main) is missing.

Expected Behavior

If peers are added on both branches both of them should show up.

Steps to Reproduce

  1. Start a fresh instance of infrahub
  2. Create three tags: initial, main and branch1
  3. Create an organisation called "my-org" and tie it to the initial tag.
  4. Create a new branch called branch1
  5. Add the branch1 tag to "my-org" in branch1
  6. Switch to the main branch
  7. Add the main tag to the "my-org" organisation
  8. Merge branch1 into main
  9. View the tags on "my-org", only initial and main shows up even though we expected initial, main and branch1 to be there.

Additional Information

No response

dgarros commented 1 year ago

Fixed in #917