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: a second task to create a branch is generated when creating a new branch that is synced to git #4658

Open
wvandeun opened this issue Oct 17, 2024 · 1 comment
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

Component

Git Integration

Infrahub version

0.16.3

Current Behavior

When you create a branch that needs to be synced to git in Infrahub, that has a CoreRepository setup, a second task will be created that tries to create the branch. This task will fail, since the branch already exists in Infrahub.

This second task seems to be created after the git repository is synced back into Infrahub.

Expected Behavior

The second task to create the branch should not be created.

Steps to Reproduce

Issue has been reported by customer. We have not found a way to reproduce it yet.
The following actions were taken to run into the situation.

  • Create an external git repository on Github. It contained some schema files which were defined in the .infrahub.yml configuration file. The repository contained a few branches
  • Spin up an instance of Infrahub
  • Setup the repository in Infrahub (normal CoreRepository)
  • Allow Infrahub to sync the repository, import the schema and branches
  • Create a new branch using the UI, make sure to check the sync with git option
  • Navigate to the tasks list in the menu
  • Wait for the next sync of the repository
  • After this sync you should see a new task to create the branch that we created before
  • The task will fail because the branch already exists

The same result was achieved by creating a branch with the infrahubctl command.

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 Oct 17, 2024
@wvandeun
Copy link
Contributor Author

The following log has been captured from the API server

024-10-16T11:48:52.730559Z [info     ] created_branch                 [infrahub] app=infrahub.api name=add_switch request_id=0b3a895a21a14ce4993a707ab80d42a0 worker=5136d654-f6fb-4c9e-a874-bb115073a34b
2024-10-16T11:48:52.772653Z [info     ] Ignoring refresh registry refresh request originating from self [infrahub] request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches worker=5136d654-f6fb-4c9e-a874-bb115073a34b
2024-10-16T11:48:52.786216Z [info     ] New branch detected, pulling schema [infrahub] branch=add_switch request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches worker=fa12bbe8-6ab8-4a41-aefa-a6c2cea645f0
2024-10-16T11:48:52.787433Z [info     ] Loading schema from cache      [infrahub] request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches
2024-10-16T11:48:52.789113Z [info     ] New branch detected, pulling schema [infrahub] branch=add_switch request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches worker=c24b820c-c2f5-479b-9518-6baa3da71db3
2024-10-16T11:48:52.789900Z [info     ] Loading schema from cache      [infrahub] request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches
2024-10-16T11:48:52.793003Z [info     ] New branch detected, pulling schema [infrahub] branch=add_switch request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches worker=b069e672-1ac3-40f4-941e-69a04293880c
2024-10-16T11:48:52.793742Z [info     ] Loading schema from cache      [infrahub] request_id=0b3a895a21a14ce4993a707ab80d42a0 routing_key=refresh.registry.branches
2024-10-16T11:49:09.473776Z [error    ] The branch add_switch, already exist [infrahub] app=infrahub.api request_id=7d69eb29fd6848b6ab255e3c50ba26cb worker=fa12bbe8-6ab8-4a41-aefa-a6c2cea645f0
2024-10-16T11:49:09.487041Z [critical ] Unhandled exception occurred in resolvers [infrahub.graphql] app=infrahub.api request_id=7d69eb29fd6848b6ab255e3c50ba26cb worker=fa12bbe8-6ab8-4a41-aefa-a6c2cea645f0
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/lib/python3.12/site-packages/graphql/execution/execute.py:530 in await_result         │
│                                                                                                  │
│    527 │   │   │   │   async def await_result() -> Any:                                          │
│    528 │   │   │   │   │   try:                                                                  │
│    529 │   │   │   │   │   │   completed = self.complete_value(                                  │
│ ❱  530 │   │   │   │   │   │   │   return_type, field_nodes, info, path, await result            │
│    531 │   │   │   │   │   │   )                                                                 │
│    532 │   │   │   │   │   │   if self.is_awaitable(completed):                                  │
│    533 │   │   │   │   │   │   │   return await completed                                        │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │       error = GraphQLError('The branch add_switch, already exist',                           │ │
│ │               locations=[SourceLocation(line=3, column=5)], path=['BranchCreate'])           │ │
│ │ field_nodes = [FieldNode at 16:420]                                                          │ │
│ │        info = GraphQLResolveInfo(                                                            │ │
│ │               │   field_name='BranchCreate',                                                 │ │
│ │               │   field_nodes=[FieldNode at 16:420],                                         │ │
│ │               │   return_type=<GrapheneObjectType 'BranchCreate'>,                           │ │
│ │               │   parent_type=<GrapheneObjectType 'Mutation'>,                               │ │
│ │               │   path=Path(prev=None, key='BranchCreate', typename='Mutation'),             │ │
│ │               │   schema=<graphql.type.schema.GraphQLSchema object at 0x7d03cd97e2d0>,       │ │
│ │               │   fragments={},                                                              │ │
│ │               │   root_value=None,                                                           │ │
│ │               │   operation=OperationDefinitionNode at 1:422,                                │ │
│ │               │   variable_values={},                                                        │ │
│ │               │   context=GraphqlContext(                                                    │ │
│ │               │   │   db=<infrahub.database.InfrahubDatabase object at 0x7d03da12f4a0>,      │ │
│ │               │   │   branch=Branch(                                                         │ │
│ │               │   │   │   id='4:3195325e-9393-44a2-bcc2-67e90820310e:1',                     │ │
│ │               │   │   │   uuid=UUID('17feea3a-48b6-42d7-34c4-c51ac75920e0'),                 │ │
│ │               │   │   │   name='main',                                                       │ │
│ │               │   │   │   status='OPEN',                                                     │ │
│ │               │   │   │   description='Default Branch',                                      │ │
│ │               │   │   │   origin_branch='main',                                              │ │
│ │               │   │   │   branched_from='2024-10-16T11:07:23.005550Z',                       │ │
│ │               │   │   │   hierarchy_level=1,                                                 │ │
│ │               │   │   │   created_at='2024-10-16T11:07:23.005607Z',                          │ │
│ │               │   │   │   is_default=True,                                                   │ │
│ │               │   │   │   is_global=False,                                                   │ │
│ │               │   │   │   is_protected=False,                                                │ │
│ │               │   │   │   sync_with_git=True,                                                │ │
│ │               │   │   │   is_isolated=True,                                                  │ │
│ │               │   │   │   schema_changed_at='2024-10-16T11:43:39.938672Z',                   │ │
│ │               │   │   │   schema_hash=SchemaBranchHash(                                      │ │
│ │               │   │   │   │   main='020bb56c28e16af49b980945af43806c',                       │ │
│ │               │   │   │   │   nodes={                                                        │ │
│ │               │   │   │   │   │   'SchemaNode': '782f30d33f81d3cd58ab0175f030cdb3',          │ │
│ │               │   │   │   │   │   'SchemaAttribute': '4d413eae1865132bb382648f0767e68a',     │ │
│ │               │   │   │   │   │   'SchemaRelationship': '81fa9b1eed96b4d672d3a98db4d7bb99',  │ │
│ │               │   │   │   │   │   'SchemaGeneric': 'adfe87a652b9d2efe6031bb9e3a6ca52',       │ │
│ │               │   │   │   │   │   'CoreStandardGroup': '1089857eb513d18a9d3e1dd000827d00',   │ │
│ │               │   │   │   │   │   'CoreGeneratorGroup': '6c7e1dc6f1f692a84fef357ca59a9c52',  │ │
│ │               │   │   │   │   │   'CoreGraphQLQueryGroup':                                   │ │
│ │               '500e3122e086e8e044f7c7e6473c5f63',                                            │ │
│ │               │   │   │   │   │   'BuiltinTag': 'bb722551be625f3dc5d5ba2bb466686c',          │ │
│ │               │   │   │   │   │   'CoreAccount': 'be600f9a60775a3fedddf786532d292a',         │ │
│ │               │   │   │   │   │   'InternalAccountToken':                                    │ │
│ │               '37041b43bc8ce99ee7f6e267e868bfe8',                                            │ │
│ │               │   │   │   │   │   ... +43                                                    │ │
│ │               │   │   │   │   },                                                             │ │
│ │               │   │   │   │   generics={                                                     │ │
│ │               │   │   │   │   │   'CoreNode': '4e59b1dc1f9cd5de63ced649b0fd2d74',            │ │
│ │               │   │   │   │   │   'LineageOwner': '6bd56054c1591a16cd6e33db908c0a0e',        │ │
│ │               │   │   │   │   │   'LineageSource': '2c92efb4b16ff47abae7a552be4dbbab',       │ │
│ │               │   │   │   │   │   'CoreComment': 'aab6f38e05a41b2afab81191ec0e7604',         │ │
│ │               │   │   │   │   │   'CoreThread': 'f68232286f9e8657865b761d747613ef',          │ │
│ │               │   │   │   │   │   'CoreGroup': '074585197a6912c39a3b4dd92262b9c0',           │ │
│ │               │   │   │   │   │   'CoreValidator': '52630f572d2a0e69e6e234a99aa47de8',       │ │
│ │               │   │   │   │   │   'CoreCheck': '0d3e7047229897dab38962c27e3be9e5',           │ │
│ │               │   │   │   │   │   'CoreTransformation': '9be0c3f320e319eba3abf0b1a52f8576',  │ │
│ │               │   │   │   │   │   'CoreArtifactTarget': 'fcb3a65a6684be4efdd8cb5774d70d96',  │ │
│ │               │   │   │   │   │   ... +12                                                    │ │
│ │               │   │   │   │   }                                                              │ │
│ │               │   │   │   )                                                                  │ │
│ │               │   │   ),                                                                     │ │
│ │               │   │   types={                                                                │ │
│ │               │   │   │   'TextAttributeType': <TextAttributeType meta=<ObjectTypeOptions    │ │
│ │               name='TextAttribute'>>,                                                        │ │
│ │               │   │   │   'DropdownType': <DropdownType meta=<ObjectTypeOptions              │ │
│ │               name='Dropdown'>>,                                                             │ │
│ │               │   │   │   'MacAddressType': <MacAddressType meta=<ObjectTypeOptions          │ │
│ │               name='MacAddress'>>,                                                           │ │
│ │               │   │   │   'NumberAttributeType': <NumberAttributeType                        │ │
│ │               meta=<ObjectTypeOptions name='NumberAttribute'>>,                              │ │
│ │               │   │   │   'IPHostType': <IPHostType meta=<ObjectTypeOptions name='IPHost'>>, │ │
│ │               │   │   │   'IPNetworkType': <IPNetworkType meta=<ObjectTypeOptions            │ │
│ │               name='IPNetwork'>>,                                                            │ │
│ │               │   │   │   'CheckboxAttributeType': <CheckboxAttributeType                    │ │
│ │               meta=<ObjectTypeOptions name='CheckboxAttribute'>>,                            │ │
│ │               │   │   │   'ListAttributeType': <ListAttributeType meta=<ObjectTypeOptions    │ │
│ │               name='ListAttribute'>>,                                                        │ │
│ │               │   │   │   'JSONAttributeType': <JSONAttributeType meta=<ObjectTypeOptions    │ │
│ │               name='JSONAttribute'>>,                                                        │ │
│ │               │   │   │   'AnyAttributeType': <AnyAttributeType meta=<ObjectTypeOptions      │ │
│ │               name='AnyAttribute'>>,                                                         │ │
│ │               │   │   │   ... +630                                                           │ │
│ │               │   │   },                                                                     │ │
│ │               │   │   at=Timestamp: 2024-10-16T11:49:09.440164Z,                             │ │
│ │               │   │   related_node_ids=set(),                                                │ │
│ │               │   │   service=<infrahub.services.InfrahubServices object at 0x7d03e3aa6840>, │ │
│ │               │   │   account_session=AccountSession(                                        │ │
│ │               │   │   │   authenticated=True,                                                │ │
│ │               │   │   │   account_id='17feea4c-5a9b-bf76-34c1-c516c6023005',                 │ │
│ │               │   │   │   session_id=None,                                                   │ │
│ │               │   │   │   role='admin',                                                      │ │
│ │               │   │   │   auth_type=<AuthType.API: 'api'>                                    │ │
│ │               │   │   ),                                                                     │ │
│ │               │   │   background=<starlette.background.BackgroundTasks object at             │ │
│ │               0x7d03d9f758e0>,                                                               │ │
│ │               │   │   request=<starlette.requests.Request object at 0x7d03da12c110>          │ │
│ │               │   ),                                                                         │ │
│ │               │   is_awaitable=<function is_awaitable at 0x7d03f454f420>                     │ │
│ │               )                                                                              │ │
│ │        path = Path(prev=None, key='BranchCreate', typename='Mutation')                       │ │
│ │      result = <coroutine object retry_db_transaction.<locals>.func_wrapper.<locals>.wrapper  │ │
│ │               at 0x7d03db251120>                                                             │ │
│ │ return_type = <GrapheneObjectType 'BranchCreate'>                                            │ │
│ │        self = <graphql.execution.execute.ExecutionContext object at 0x7d03d92724b0>          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /source/backend/infrahub/database/__init__.py:419 in wrapper                                     │
│                                                                                                  │
│   416 │   │   async def wrapper(*args, **kwargs):                                                │
│   417 │   │   │   for attempt in range(1, config.SETTINGS.database.retry_limit + 1):             │
│   418 │   │   │   │   try:                                                                       │
│ ❱ 419 │   │   │   │   │   return await func(*args, **kwargs)                                     │
│   420 │   │   │   │   except (TransientError, ClientError) as exc:                               │
│   421 │   │   │   │   │   if isinstance(exc, ClientError):                                       │
│   422 │   │   │   │   │   │   if exc.code != "Neo.ClientError.Statement.EntityNotFound":         │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │    args = (                                                                                  │ │
│ │           │   <BranchCreate meta=<MutationOptions name='BranchCreate'>>,                     │ │
│ │           │   None,                                                                          │ │
│ │           │   GraphQLResolveInfo(                                                            │ │
│ │           │   │   field_name='BranchCreate',                                                 │ │
│ │           │   │   field_nodes=[FieldNode at 16:420],                                         │ │
│ │           │   │   return_type=<GrapheneObjectType 'BranchCreate'>,                           │ │
│ │           │   │   parent_type=<GrapheneObjectType 'Mutation'>,                               │ │
│ │           │   │   path=Path(prev=None, key='BranchCreate', typename='Mutation'),             │ │
│ │           │   │   schema=<graphql.type.schema.GraphQLSchema object at 0x7d03cd97e2d0>,       │ │
│ │           │   │   fragments={},                                                              │ │
│ │           │   │   root_value=None,                                                           │ │
│ │           │   │   operation=OperationDefinitionNode at 1:422,                                │ │
│ │           │   │   variable_values={},                                                        │ │
│ │           │   │   context=GraphqlContext(                                                    │ │
│ │           │   │   │   db=<infrahub.database.InfrahubDatabase object at 0x7d03da12f4a0>,      │ │
│ │           │   │   │   branch=Branch(                                                         │ │
│ │           │   │   │   │   id='4:3195325e-9393-44a2-bcc2-67e90820310e:1',                     │ │
│ │           │   │   │   │   uuid=UUID('17feea3a-48b6-42d7-34c4-c51ac75920e0'),                 │ │
│ │           │   │   │   │   name='main',                                                       │ │
│ │           │   │   │   │   status='OPEN',                                                     │ │
│ │           │   │   │   │   description='Default Branch',                                      │ │
│ │           │   │   │   │   origin_branch='main',                                              │ │
│ │           │   │   │   │   branched_from='2024-10-16T11:07:23.005550Z',                       │ │
│ │           │   │   │   │   hierarchy_level=1,                                                 │ │
│ │           │   │   │   │   created_at='2024-10-16T11:07:23.005607Z',                          │ │
│ │           │   │   │   │   is_default=True,                                                   │ │
│ │           │   │   │   │   is_global=False,                                                   │ │
│ │           │   │   │   │   is_protected=False,                                                │ │
│ │           │   │   │   │   sync_with_git=True,                                                │ │
│ │           │   │   │   │   is_isolated=True,                                                  │ │
│ │           │   │   │   │   schema_changed_at='2024-10-16T11:43:39.938672Z',                   │ │
│ │           │   │   │   │   schema_hash=SchemaBranchHash(                                      │ │
│ │           │   │   │   │   │   main='020bb56c28e16af49b980945af43806c',                       │ │
│ │           │   │   │   │   │   nodes={                                                        │ │
│ │           │   │   │   │   │   │   'SchemaNode': '782f30d33f81d3cd58ab0175f030cdb3',          │ │
│ │           │   │   │   │   │   │   'SchemaAttribute': '4d413eae1865132bb382648f0767e68a',     │ │
│ │           │   │   │   │   │   │   'SchemaRelationship': '81fa9b1eed96b4d672d3a98db4d7bb99',  │ │
│ │           │   │   │   │   │   │   'SchemaGeneric': 'adfe87a652b9d2efe6031bb9e3a6ca52',       │ │
│ │           │   │   │   │   │   │   'CoreStandardGroup': '1089857eb513d18a9d3e1dd000827d00',   │ │
│ │           │   │   │   │   │   │   'CoreGeneratorGroup': '6c7e1dc6f1f692a84fef357ca59a9c52',  │ │
│ │           │   │   │   │   │   │   'CoreGraphQLQueryGroup':                                   │ │
│ │           '500e3122e086e8e044f7c7e6473c5f63',                                                │ │
│ │           │   │   │   │   │   │   'BuiltinTag': 'bb722551be625f3dc5d5ba2bb466686c',          │ │
│ │           │   │   │   │   │   │   'CoreAccount': 'be600f9a60775a3fedddf786532d292a',         │ │
│ │           │   │   │   │   │   │   'InternalAccountToken':                                    │ │
│ │           '37041b43bc8ce99ee7f6e267e868bfe8',                                                │ │
│ │           │   │   │   │   │   │   ... +43                                                    │ │
│ │           │   │   │   │   │   },                                                             │ │
│ │           │   │   │   │   │   generics={                                                     │ │
│ │           │   │   │   │   │   │   'CoreNode': '4e59b1dc1f9cd5de63ced649b0fd2d74',            │ │
│ │           │   │   │   │   │   │   'LineageOwner': '6bd56054c1591a16cd6e33db908c0a0e',        │ │
│ │           │   │   │   │   │   │   'LineageSource': '2c92efb4b16ff47abae7a552be4dbbab',       │ │
│ │           │   │   │   │   │   │   'CoreComment': 'aab6f38e05a41b2afab81191ec0e7604',         │ │
│ │           │   │   │   │   │   │   'CoreThread': 'f68232286f9e8657865b761d747613ef',          │ │
│ │           │   │   │   │   │   │   'CoreGroup': '074585197a6912c39a3b4dd92262b9c0',           │ │
│ │           │   │   │   │   │   │   'CoreValidator': '52630f572d2a0e69e6e234a99aa47de8',       │ │
│ │           │   │   │   │   │   │   'CoreCheck': '0d3e7047229897dab38962c27e3be9e5',           │ │
│ │           │   │   │   │   │   │   'CoreTransformation': '9be0c3f320e319eba3abf0b1a52f8576',  │ │
│ │           │   │   │   │   │   │   'CoreArtifactTarget': 'fcb3a65a6684be4efdd8cb5774d70d96',  │ │
│ │           │   │   │   │   │   │   ... +12                                                    │ │
│ │           │   │   │   │   │   }                                                              │ │
│ │           │   │   │   │   )                                                                  │ │
│ │           │   │   │   ),                                                                     │ │
│ │           │   │   │   types={                                                                │ │
│ │           │   │   │   │   'TextAttributeType': <TextAttributeType meta=<ObjectTypeOptions    │ │
│ │           name='TextAttribute'>>,                                                            │ │
│ │           │   │   │   │   'DropdownType': <DropdownType meta=<ObjectTypeOptions              │ │
│ │           name='Dropdown'>>,                                                                 │ │
│ │           │   │   │   │   'MacAddressType': <MacAddressType meta=<ObjectTypeOptions          │ │
│ │           name='MacAddress'>>,                                                               │ │
│ │           │   │   │   │   'NumberAttributeType': <NumberAttributeType                        │ │
│ │           meta=<ObjectTypeOptions name='NumberAttribute'>>,                                  │ │
│ │           │   │   │   │   'IPHostType': <IPHostType meta=<ObjectTypeOptions name='IPHost'>>, │ │
│ │           │   │   │   │   'IPNetworkType': <IPNetworkType meta=<ObjectTypeOptions            │ │
│ │           name='IPNetwork'>>,                                                                │ │
│ │           │   │   │   │   'CheckboxAttributeType': <CheckboxAttributeType                    │ │
│ │           meta=<ObjectTypeOptions name='CheckboxAttribute'>>,                                │ │
│ │           │   │   │   │   'ListAttributeType': <ListAttributeType meta=<ObjectTypeOptions    │ │
│ │           name='ListAttribute'>>,                                                            │ │
│ │           │   │   │   │   'JSONAttributeType': <JSONAttributeType meta=<ObjectTypeOptions    │ │
│ │           name='JSONAttribute'>>,                                                            │ │
│ │           │   │   │   │   'AnyAttributeType': <AnyAttributeType meta=<ObjectTypeOptions      │ │
│ │           name='AnyAttribute'>>,                                                             │ │
│ │           │   │   │   │   ... +630                                                           │ │
│ │           │   │   │   },                                                                     │ │
│ │           │   │   │   at=Timestamp: 2024-10-16T11:49:09.440164Z,                             │ │
│ │           │   │   │   related_node_ids=set(),                                                │ │
│ │           │   │   │   service=<infrahub.services.InfrahubServices object at 0x7d03e3aa6840>, │ │
│ │           │   │   │   account_session=AccountSession(                                        │ │
│ │           │   │   │   │   authenticated=True,                                                │ │
│ │           │   │   │   │   account_id='17feea4c-5a9b-bf76-34c1-c516c6023005',                 │ │
│ │           │   │   │   │   session_id=None,                                                   │ │
│ │           │   │   │   │   role='admin',                                                      │ │
│ │           │   │   │   │   auth_type=<AuthType.API: 'api'>                                    │ │
│ │           │   │   │   ),                                                                     │ │
│ │           │   │   │   background=<starlette.background.BackgroundTasks object at             │ │
│ │           0x7d03d9f758e0>,                                                                   │ │
│ │           │   │   │   request=<starlette.requests.Request object at 0x7d03da12c110>          │ │
│ │           │   │   ),                                                                         │ │
│ │           │   │   is_awaitable=<function is_awaitable at 0x7d03f454f420>                     │ │
│ │           │   )                                                                              │ │
│ │           )                                                                                  │ │
│ │ attempt = 1                                                                                  │ │
│ │    func = <function BranchCreate.mutate at 0x7d03e5eb5120>                                   │ │
│ │  kwargs = {                                                                                  │ │
│ │           │   'background_execution': True,                                                  │ │
│ │           │   'data': {'name': 'add_switch', 'description': '', 'sync_with_git': True}       │ │
│ │           }                                                                                  │ │
│ │    name = 'branch_create'                                                                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/local/lib/python3.12/site-packages/opentelemetry/util/_decorator.py:68 in async_wrapper     │
│                                                                                                  │
│   65 │   │   │   @functools.wraps(func)  # type: ignore                                          │
│   66 │   │   │   async def async_wrapper(*args: Pargs, **kwargs: Pkwargs) -> R:                  │
│   67 │   │   │   │   with self._recreate_cm():  # type: ignore                                   │
│ ❱ 68 │   │   │   │   │   return await func(*args, **kwargs)  # type: ignore                      │
│   69 │   │   │                                                                                   │
│   70 │   │   │   return async_wrapper  # type: ignore                                            │
│   71 │   │   return super().__call__(func)  # type: ignore                                       │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │   args = (                                                                                   │ │
│ │          │   <BranchCreate meta=<MutationOptions name='BranchCreate'>>,                      │ │
│ │          │   None,                                                                           │ │
│ │          │   GraphQLResolveInfo(                                                             │ │
│ │          │   │   field_name='BranchCreate',                                                  │ │
│ │          │   │   field_nodes=[FieldNode at 16:420],                                          │ │
│ │          │   │   return_type=<GrapheneObjectType 'BranchCreate'>,                            │ │
│ │          │   │   parent_type=<GrapheneObjectType 'Mutation'>,                                │ │
│ │          │   │   path=Path(prev=None, key='BranchCreate', typename='Mutation'),              │ │
│ │          │   │   schema=<graphql.type.schema.GraphQLSchema object at 0x7d03cd97e2d0>,        │ │
│ │          │   │   fragments={},                                                               │ │
│ │          │   │   root_value=None,                                                            │ │
│ │          │   │   operation=OperationDefinitionNode at 1:422,                                 │ │
│ │          │   │   variable_values={},                                                         │ │
│ │          │   │   context=GraphqlContext(                                                     │ │
│ │          │   │   │   db=<infrahub.database.InfrahubDatabase object at 0x7d03da12f4a0>,       │ │
│ │          │   │   │   branch=Branch(                                                          │ │
│ │          │   │   │   │   id='4:3195325e-9393-44a2-bcc2-67e90820310e:1',                      │ │
│ │          │   │   │   │   uuid=UUID('17feea3a-48b6-42d7-34c4-c51ac75920e0'),                  │ │
│ │          │   │   │   │   name='main',                                                        │ │
│ │          │   │   │   │   status='OPEN',                                                      │ │
│ │          │   │   │   │   description='Default Branch',                                       │ │
│ │          │   │   │   │   origin_branch='main',                                               │ │
│ │          │   │   │   │   branched_from='2024-10-16T11:07:23.005550Z',                        │ │
│ │          │   │   │   │   hierarchy_level=1,                                                  │ │
│ │          │   │   │   │   created_at='2024-10-16T11:07:23.005607Z',                           │ │
│ │          │   │   │   │   is_default=True,                                                    │ │
│ │          │   │   │   │   is_global=False,                                                    │ │
│ │          │   │   │   │   is_protected=False,                                                 │ │
│ │          │   │   │   │   sync_with_git=True,                                                 │ │
│ │          │   │   │   │   is_isolated=True,                                                   │ │
│ │          │   │   │   │   schema_changed_at='2024-10-16T11:43:39.938672Z',                    │ │
│ │          │   │   │   │   schema_hash=SchemaBranchHash(                                       │ │
│ │          │   │   │   │   │   main='020bb56c28e16af49b980945af43806c',                        │ │
│ │          │   │   │   │   │   nodes={                                                         │ │
│ │          │   │   │   │   │   │   'SchemaNode': '782f30d33f81d3cd58ab0175f030cdb3',           │ │
│ │          │   │   │   │   │   │   'SchemaAttribute': '4d413eae1865132bb382648f0767e68a',      │ │
│ │          │   │   │   │   │   │   'SchemaRelationship': '81fa9b1eed96b4d672d3a98db4d7bb99',   │ │
│ │          │   │   │   │   │   │   'SchemaGeneric': 'adfe87a652b9d2efe6031bb9e3a6ca52',        │ │
│ │          │   │   │   │   │   │   'CoreStandardGroup': '1089857eb513d18a9d3e1dd000827d00',    │ │
│ │          │   │   │   │   │   │   'CoreGeneratorGroup': '6c7e1dc6f1f692a84fef357ca59a9c52',   │ │
│ │          │   │   │   │   │   │   'CoreGraphQLQueryGroup':                                    │ │
│ │          '500e3122e086e8e044f7c7e6473c5f63',                                                 │ │
│ │          │   │   │   │   │   │   'BuiltinTag': 'bb722551be625f3dc5d5ba2bb466686c',           │ │
│ │          │   │   │   │   │   │   'CoreAccount': 'be600f9a60775a3fedddf786532d292a',          │ │
│ │          │   │   │   │   │   │   'InternalAccountToken': '37041b43bc8ce99ee7f6e267e868bfe8', │ │
│ │          │   │   │   │   │   │   ... +43                                                     │ │
│ │          │   │   │   │   │   },                                                              │ │
│ │          │   │   │   │   │   generics={                                                      │ │
│ │          │   │   │   │   │   │   'CoreNode': '4e59b1dc1f9cd5de63ced649b0fd2d74',             │ │
│ │          │   │   │   │   │   │   'LineageOwner': '6bd56054c1591a16cd6e33db908c0a0e',         │ │
│ │          │   │   │   │   │   │   'LineageSource': '2c92efb4b16ff47abae7a552be4dbbab',        │ │
│ │          │   │   │   │   │   │   'CoreComment': 'aab6f38e05a41b2afab81191ec0e7604',          │ │
│ │          │   │   │   │   │   │   'CoreThread': 'f68232286f9e8657865b761d747613ef',           │ │
│ │          │   │   │   │   │   │   'CoreGroup': '074585197a6912c39a3b4dd92262b9c0',            │ │
│ │          │   │   │   │   │   │   'CoreValidator': '52630f572d2a0e69e6e234a99aa47de8',        │ │
│ │          │   │   │   │   │   │   'CoreCheck': '0d3e7047229897dab38962c27e3be9e5',            │ │
│ │          │   │   │   │   │   │   'CoreTransformation': '9be0c3f320e319eba3abf0b1a52f8576',   │ │
│ │          │   │   │   │   │   │   'CoreArtifactTarget': 'fcb3a65a6684be4efdd8cb5774d70d96',   │ │
│ │          │   │   │   │   │   │   ... +12                                                     │ │
│ │          │   │   │   │   │   }                                                               │ │
│ │          │   │   │   │   )                                                                   │ │
│ │          │   │   │   ),                                                                      │ │
│ │          │   │   │   types={                                                                 │ │
│ │          │   │   │   │   'TextAttributeType': <TextAttributeType meta=<ObjectTypeOptions     │ │
│ │          name='TextAttribute'>>,                                                             │ │
│ │          │   │   │   │   'DropdownType': <DropdownType meta=<ObjectTypeOptions               │ │
│ │          name='Dropdown'>>,                                                                  │ │
│ │          │   │   │   │   'MacAddressType': <MacAddressType meta=<ObjectTypeOptions           │ │
│ │          name='MacAddress'>>,                                                                │ │
│ │          │   │   │   │   'NumberAttributeType': <NumberAttributeType meta=<ObjectTypeOptions │ │
│ │          name='NumberAttribute'>>,                                                           │ │
│ │          │   │   │   │   'IPHostType': <IPHostType meta=<ObjectTypeOptions name='IPHost'>>,  │ │
│ │          │   │   │   │   'IPNetworkType': <IPNetworkType meta=<ObjectTypeOptions             │ │
│ │          name='IPNetwork'>>,                                                                 │ │
│ │          │   │   │   │   'CheckboxAttributeType': <CheckboxAttributeType                     │ │
│ │          meta=<ObjectTypeOptions name='CheckboxAttribute'>>,                                 │ │
│ │          │   │   │   │   'ListAttributeType': <ListAttributeType meta=<ObjectTypeOptions     │ │
│ │          name='ListAttribute'>>,                                                             │ │
│ │          │   │   │   │   'JSONAttributeType': <JSONAttributeType meta=<ObjectTypeOptions     │ │
│ │          name='JSONAttribute'>>,                                                             │ │
│ │          │   │   │   │   'AnyAttributeType': <AnyAttributeType meta=<ObjectTypeOptions       │ │
│ │          name='AnyAttribute'>>,                                                              │ │
│ │          │   │   │   │   ... +630                                                            │ │
│ │          │   │   │   },                                                                      │ │
│ │          │   │   │   at=Timestamp: 2024-10-16T11:49:09.440164Z,                              │ │
│ │          │   │   │   related_node_ids=set(),                                                 │ │
│ │          │   │   │   service=<infrahub.services.InfrahubServices object at 0x7d03e3aa6840>,  │ │
│ │          │   │   │   account_session=AccountSession(                                         │ │
│ │          │   │   │   │   authenticated=True,                                                 │ │
│ │          │   │   │   │   account_id='17feea4c-5a9b-bf76-34c1-c516c6023005',                  │ │
│ │          │   │   │   │   session_id=None,                                                    │ │
│ │          │   │   │   │   role='admin',                                                       │ │
│ │          │   │   │   │   auth_type=<AuthType.API: 'api'>                                     │ │
│ │          │   │   │   ),                                                                      │ │
│ │          │   │   │   background=<starlette.background.BackgroundTasks object at              │ │
│ │          0x7d03d9f758e0>,                                                                    │ │
│ │          │   │   │   request=<starlette.requests.Request object at 0x7d03da12c110>           │ │
│ │          │   │   ),                                                                          │ │
│ │          │   │   is_awaitable=<function is_awaitable at 0x7d03f454f420>                      │ │
│ │          │   )                                                                               │ │
│ │          )                                                                                   │ │
│ │   func = <function BranchCreate.mutate at 0x7d03e5e9f4c0>                                    │ │
│ │ kwargs = {                                                                                   │ │
│ │          │   'background_execution': True,                                                   │ │
│ │          │   'data': {'name': 'add_switch', 'description': '', 'sync_with_git': True}        │ │
│ │          }                                                                                   │ │
│ │   self = <opentelemetry.util._decorator._AgnosticContextManager object at 0x7d03e5f257f0>    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /source/backend/infrahub/graphql/mutations/branch.py:70 in mutate                                │
│                                                                                                  │
│    67 │   │   │   # Check if the branch already exist                                            │
│    68 │   │   │   try:                                                                           │
│    69 │   │   │   │   await Branch.get_by_name(db=context.db, name=data["name"])                 │
│ ❱  70 │   │   │   │   raise ValueError(f"The branch {data['name']}, already exist")              │
│    71 │   │   │   except BranchNotFoundError:                                                    │
│    72 │   │   │   │   pass                                                                       │
│    73                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ background_execution = True                                                                  │ │
│ │                  cls = <BranchCreate meta=<MutationOptions name='BranchCreate'>>             │ │
│ │              context = GraphqlContext(                                                       │ │
│ │                        │   db=<infrahub.database.InfrahubDatabase object at 0x7d03da12f4a0>, │ │
│ │                        │   branch=Branch(                                                    │ │
│ │                        │   │   id='4:3195325e-9393-44a2-bcc2-67e90820310e:1',                │ │
│ │                        │   │   uuid=UUID('17feea3a-48b6-42d7-34c4-c51ac75920e0'),            │ │
│ │                        │   │   name='main',                                                  │ │
│ │                        │   │   status='OPEN',                                                │ │
│ │                        │   │   description='Default Branch',                                 │ │
│ │                        │   │   origin_branch='main',                                         │ │
│ │                        │   │   branched_from='2024-10-16T11:07:23.005550Z',                  │ │
│ │                        │   │   hierarchy_level=1,                                            │ │
│ │                        │   │   created_at='2024-10-16T11:07:23.005607Z',                     │ │
│ │                        │   │   is_default=True,                                              │ │
│ │                        │   │   is_global=False,                                              │ │
│ │                        │   │   is_protected=False,                                           │ │
│ │                        │   │   sync_with_git=True,                                           │ │
│ │                        │   │   is_isolated=True,                                             │ │
│ │                        │   │   schema_changed_at='2024-10-16T11:43:39.938672Z',              │ │
│ │                        │   │   schema_hash=SchemaBranchHash(                                 │ │
│ │                        │   │   │   main='020bb56c28e16af49b980945af43806c',                  │ │
│ │                        │   │   │   nodes={                                                   │ │
│ │                        │   │   │   │   'SchemaNode': '782f30d33f81d3cd58ab0175f030cdb3',     │ │
│ │                        │   │   │   │   'SchemaAttribute':                                    │ │
│ │                        '4d413eae1865132bb382648f0767e68a',                                   │ │
│ │                        │   │   │   │   'SchemaRelationship':                                 │ │
│ │                        '81fa9b1eed96b4d672d3a98db4d7bb99',                                   │ │
│ │                        │   │   │   │   'SchemaGeneric': 'adfe87a652b9d2efe6031bb9e3a6ca52',  │ │
│ │                        │   │   │   │   'CoreStandardGroup':                                  │ │
│ │                        '1089857eb513d18a9d3e1dd000827d00',                                   │ │
│ │                        │   │   │   │   'CoreGeneratorGroup':                                 │ │
│ │                        '6c7e1dc6f1f692a84fef357ca59a9c52',                                   │ │
│ │                        │   │   │   │   'CoreGraphQLQueryGroup':                              │ │
│ │                        '500e3122e086e8e044f7c7e6473c5f63',                                   │ │
│ │                        │   │   │   │   'BuiltinTag': 'bb722551be625f3dc5d5ba2bb466686c',     │ │
│ │                        │   │   │   │   'CoreAccount': 'be600f9a60775a3fedddf786532d292a',    │ │
│ │                        │   │   │   │   'InternalAccountToken':                               │ │
│ │                        '37041b43bc8ce99ee7f6e267e868bfe8',                                   │ │
│ │                        │   │   │   │   ... +43                                               │ │
│ │                        │   │   │   },                                                        │ │
│ │                        │   │   │   generics={                                                │ │
│ │                        │   │   │   │   'CoreNode': '4e59b1dc1f9cd5de63ced649b0fd2d74',       │ │
│ │                        │   │   │   │   'LineageOwner': '6bd56054c1591a16cd6e33db908c0a0e',   │ │
│ │                        │   │   │   │   'LineageSource': '2c92efb4b16ff47abae7a552be4dbbab',  │ │
│ │                        │   │   │   │   'CoreComment': 'aab6f38e05a41b2afab81191ec0e7604',    │ │
│ │                        │   │   │   │   'CoreThread': 'f68232286f9e8657865b761d747613ef',     │ │
│ │                        │   │   │   │   'CoreGroup': '074585197a6912c39a3b4dd92262b9c0',      │ │
│ │                        │   │   │   │   'CoreValidator': '52630f572d2a0e69e6e234a99aa47de8',  │ │
│ │                        │   │   │   │   'CoreCheck': '0d3e7047229897dab38962c27e3be9e5',      │ │
│ │                        │   │   │   │   'CoreTransformation':                                 │ │
│ │                        '9be0c3f320e319eba3abf0b1a52f8576',                                   │ │
│ │                        │   │   │   │   'CoreArtifactTarget':                                 │ │
│ │                        'fcb3a65a6684be4efdd8cb5774d70d96',                                   │ │
│ │                        │   │   │   │   ... +12                                               │ │
│ │                        │   │   │   }                                                         │ │
│ │                        │   │   )                                                             │ │
│ │                        │   ),                                                                │ │
│ │                        │   types={                                                           │ │
│ │                        │   │   'TextAttributeType': <TextAttributeType                       │ │
│ │                        meta=<ObjectTypeOptions name='TextAttribute'>>,                       │ │
│ │                        │   │   'DropdownType': <DropdownType meta=<ObjectTypeOptions         │ │
│ │                        name='Dropdown'>>,                                                    │ │
│ │                        │   │   'MacAddressType': <MacAddressType meta=<ObjectTypeOptions     │ │
│ │                        name='MacAddress'>>,                                                  │ │
│ │                        │   │   'NumberAttributeType': <NumberAttributeType                   │ │
│ │                        meta=<ObjectTypeOptions name='NumberAttribute'>>,                     │ │
│ │                        │   │   'IPHostType': <IPHostType meta=<ObjectTypeOptions             │ │
│ │                        name='IPHost'>>,                                                      │ │
│ │                        │   │   'IPNetworkType': <IPNetworkType meta=<ObjectTypeOptions       │ │
│ │                        name='IPNetwork'>>,                                                   │ │
│ │                        │   │   'CheckboxAttributeType': <CheckboxAttributeType               │ │
│ │                        meta=<ObjectTypeOptions name='CheckboxAttribute'>>,                   │ │
│ │                        │   │   'ListAttributeType': <ListAttributeType                       │ │
│ │                        meta=<ObjectTypeOptions name='ListAttribute'>>,                       │ │
│ │                        │   │   'JSONAttributeType': <JSONAttributeType                       │ │
│ │                        meta=<ObjectTypeOptions name='JSONAttribute'>>,                       │ │
│ │                        │   │   'AnyAttributeType': <AnyAttributeType meta=<ObjectTypeOptions │ │
│ │                        name='AnyAttribute'>>,                                                │ │
│ │                        │   │   ... +630                                                      │ │
│ │                        │   },                                                                │ │
│ │                        │   at=Timestamp: 2024-10-16T11:49:09.440164Z,                        │ │
│ │                        │   related_node_ids=set(),                                           │ │
│ │                        │   service=<infrahub.services.InfrahubServices object at             │ │
│ │                        0x7d03e3aa6840>,                                                      │ │
│ │                        │   account_session=AccountSession(                                   │ │
│ │                        │   │   authenticated=True,                                           │ │
│ │                        │   │   account_id='17feea4c-5a9b-bf76-34c1-c516c6023005',            │ │
│ │                        │   │   session_id=None,                                              │ │
│ │                        │   │   role='admin',                                                 │ │
│ │                        │   │   auth_type=<AuthType.API: 'api'>                               │ │
│ │                        │   ),                                                                │ │
│ │                        │   background=<starlette.background.BackgroundTasks object at        │ │
│ │                        0x7d03d9f758e0>,                                                      │ │
│ │                        │   request=<starlette.requests.Request object at 0x7d03da12c110>     │ │
│ │                        )                                                                     │ │
│ │                 data = {'name': 'add_switch', 'description': '', 'sync_with_git': True}      │ │
│ │                 info = GraphQLResolveInfo(                                                   │ │
│ │                        │   field_name='BranchCreate',                                        │ │
│ │                        │   field_nodes=[FieldNode at 16:420],                                │ │
│ │                        │   return_type=<GrapheneObjectType 'BranchCreate'>,                  │ │
│ │                        │   parent_type=<GrapheneObjectType 'Mutation'>,                      │ │
│ │                        │   path=Path(prev=None, key='BranchCreate', typename='Mutation'),    │ │
│ │                        │   schema=<graphql.type.schema.GraphQLSchema object at               │ │
│ │                        0x7d03cd97e2d0>,                                                      │ │
│ │                        │   fragments={},                                                     │ │
│ │                        │   root_value=None,                                                  │ │
│ │                        │   operation=OperationDefinitionNode at 1:422,                       │ │
│ │                        │   variable_values={},                                               │ │
│ │                        │   context=GraphqlContext(                                           │ │
│ │                        │   │   db=<infrahub.database.InfrahubDatabase object at              │ │
│ │                        0x7d03da12f4a0>,                                                      │ │
│ │                        │   │   branch=Branch(                                                │ │
│ │                        │   │   │   id='4:3195325e-9393-44a2-bcc2-67e90820310e:1',            │ │
│ │                        │   │   │   uuid=UUID('17feea3a-48b6-42d7-34c4-c51ac75920e0'),        │ │
│ │                        │   │   │   name='main',                                              │ │
│ │                        │   │   │   status='OPEN',                                            │ │
│ │                        │   │   │   description='Default Branch',                             │ │
│ │                        │   │   │   origin_branch='main',                                     │ │
│ │                        │   │   │   branched_from='2024-10-16T11:07:23.005550Z',              │ │
│ │                        │   │   │   hierarchy_level=1,                                        │ │
│ │                        │   │   │   created_at='2024-10-16T11:07:23.005607Z',                 │ │
│ │                        │   │   │   is_default=True,                                          │ │
│ │                        │   │   │   is_global=False,                                          │ │
│ │                        │   │   │   is_protected=False,                                       │ │
│ │                        │   │   │   sync_with_git=True,                                       │ │
│ │                        │   │   │   is_isolated=True,                                         │ │
│ │                        │   │   │   schema_changed_at='2024-10-16T11:43:39.938672Z',          │ │
│ │                        │   │   │   schema_hash=SchemaBranchHash(                             │ │
│ │                        │   │   │   │   main='020bb56c28e16af49b980945af43806c',              │ │
│ │                        │   │   │   │   nodes={                                               │ │
│ │                        │   │   │   │   │   'SchemaNode': '782f30d33f81d3cd58ab0175f030cdb3', │ │
│ │                        │   │   │   │   │   'SchemaAttribute':                                │ │
│ │                        '4d413eae1865132bb382648f0767e68a',                                   │ │
│ │                        │   │   │   │   │   'SchemaRelationship':                             │ │
│ │                        '81fa9b1eed96b4d672d3a98db4d7bb99',                                   │ │
│ │                        │   │   │   │   │   'SchemaGeneric':                                  │ │
│ │                        'adfe87a652b9d2efe6031bb9e3a6ca52',                                   │ │
│ │                        │   │   │   │   │   'CoreStandardGroup':                              │ │
│ │                        '1089857eb513d18a9d3e1dd000827d00',                                   │ │
│ │                        │   │   │   │   │   'CoreGeneratorGroup':                             │ │
│ │                        '6c7e1dc6f1f692a84fef357ca59a9c52',                                   │ │
│ │                        │   │   │   │   │   'CoreGraphQLQueryGroup':                          │ │
│ │                        '500e3122e086e8e044f7c7e6473c5f63',                                   │ │
│ │                        │   │   │   │   │   'BuiltinTag': 'bb722551be625f3dc5d5ba2bb466686c', │ │
│ │                        │   │   │   │   │   'CoreAccount':                                    │ │
│ │                        'be600f9a60775a3fedddf786532d292a',                                   │ │
│ │                        │   │   │   │   │   'InternalAccountToken':                           │ │
│ │                        '37041b43bc8ce99ee7f6e267e868bfe8',                                   │ │
│ │                        │   │   │   │   │   ... +43                                           │ │
│ │                        │   │   │   │   },                                                    │ │
│ │                        │   │   │   │   generics={                                            │ │
│ │                        │   │   │   │   │   'CoreNode': '4e59b1dc1f9cd5de63ced649b0fd2d74',   │ │
│ │                        │   │   │   │   │   'LineageOwner':                                   │ │
│ │                        '6bd56054c1591a16cd6e33db908c0a0e',                                   │ │
│ │                        │   │   │   │   │   'LineageSource':                                  │ │
│ │                        '2c92efb4b16ff47abae7a552be4dbbab',                                   │ │
│ │                        │   │   │   │   │   'CoreComment':                                    │ │
│ │                        'aab6f38e05a41b2afab81191ec0e7604',                                   │ │
│ │                        │   │   │   │   │   'CoreThread': 'f68232286f9e8657865b761d747613ef', │ │
│ │                        │   │   │   │   │   'CoreGroup': '074585197a6912c39a3b4dd92262b9c0',  │ │
│ │                        │   │   │   │   │   'CoreValidator':                                  │ │
│ │                        '52630f572d2a0e69e6e234a99aa47de8',                                   │ │
│ │                        │   │   │   │   │   'CoreCheck': '0d3e7047229897dab38962c27e3be9e5',  │ │
│ │                        │   │   │   │   │   'CoreTransformation':                             │ │
│ │                        '9be0c3f320e319eba3abf0b1a52f8576',                                   │ │
│ │                        │   │   │   │   │   'CoreArtifactTarget':                             │ │
│ │                        'fcb3a65a6684be4efdd8cb5774d70d96',                                   │ │
│ │                        │   │   │   │   │   ... +12                                           │ │
│ │                        │   │   │   │   }                                                     │ │
│ │                        │   │   │   )                                                         │ │
│ │                        │   │   ),                                                            │ │
│ │                        │   │   types={                                                       │ │
│ │                        │   │   │   'TextAttributeType': <TextAttributeType                   │ │
│ │                        meta=<ObjectTypeOptions name='TextAttribute'>>,                       │ │
│ │                        │   │   │   'DropdownType': <DropdownType meta=<ObjectTypeOptions     │ │
│ │                        name='Dropdown'>>,                                                    │ │
│ │                        │   │   │   'MacAddressType': <MacAddressType meta=<ObjectTypeOptions │ │
│ │                        name='MacAddress'>>,                                                  │ │
│ │                        │   │   │   'NumberAttributeType': <NumberAttributeType               │ │
│ │                        meta=<ObjectTypeOptions name='NumberAttribute'>>,                     │ │
│ │                        │   │   │   'IPHostType': <IPHostType meta=<ObjectTypeOptions         │ │
│ │                        name='IPHost'>>,                                                      │ │
│ │                        │   │   │   'IPNetworkType': <IPNetworkType meta=<ObjectTypeOptions   │ │
│ │                        name='IPNetwork'>>,                                                   │ │
│ │                        │   │   │   'CheckboxAttributeType': <CheckboxAttributeType           │ │
│ │                        meta=<ObjectTypeOptions name='CheckboxAttribute'>>,                   │ │
│ │                        │   │   │   'ListAttributeType': <ListAttributeType                   │ │
│ │                        meta=<ObjectTypeOptions name='ListAttribute'>>,                       │ │
│ │                        │   │   │   'JSONAttributeType': <JSONAttributeType                   │ │
│ │                        meta=<ObjectTypeOptions name='JSONAttribute'>>,                       │ │
│ │                        │   │   │   'AnyAttributeType': <AnyAttributeType                     │ │
│ │                        meta=<ObjectTypeOptions name='AnyAttribute'>>,                        │ │
│ │                        │   │   │   ... +630                                                  │ │
│ │                        │   │   },                                                            │ │
│ │                        │   │   at=Timestamp: 2024-10-16T11:49:09.440164Z,                    │ │
│ │                        │   │   related_node_ids=set(),                                       │ │
│ │                        │   │   service=<infrahub.services.InfrahubServices object at         │ │
│ │                        0x7d03e3aa6840>,                                                      │ │
│ │                        │   │   account_session=AccountSession(                               │ │
│ │                        │   │   │   authenticated=True,                                       │ │
│ │                        │   │   │   account_id='17feea4c-5a9b-bf76-34c1-c516c6023005',        │ │
│ │                        │   │   │   session_id=None,                                          │ │
│ │                        │   │   │   role='admin',                                             │ │
│ │                        │   │   │   auth_type=<AuthType.API: 'api'>                           │ │
│ │                        │   │   ),                                                            │ │
│ │                        │   │   background=<starlette.background.BackgroundTasks object at    │ │
│ │                        0x7d03d9f758e0>,                                                      │ │
│ │                        │   │   request=<starlette.requests.Request object at 0x7d03da12c110> │ │
│ │                        │   ),                                                                │ │
│ │                        │   is_awaitable=<function is_awaitable at 0x7d03f454f420>            │ │
│ │                        )                                                                     │ │
│ │                 root = None                                                                  │ │
│ │                 task = <infrahub.core.task.user_task.UserTask object at 0x7d03d9271fd0>      │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: The branch add_switch, already exist

2024-10-16T11:49:18.340666Z [info     ] schema_load_request            [infrahub] app=infrahub.api branch=add_switch request_id=390f8c7131df4d0c94f09bc916bc005a worker=b069e672-1ac3-40f4-941e-69a04293880c

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