Skip to content

bug: small branch deletion error #7161

@ryanmerolle

Description

@ryanmerolle

h3. Component

[| #component]

Not Sure

h3. Infrahub version

[| #infrahub-version]

1.4.4

h3. Current Behavior

[| #current-behavior]

Using infrahubctl to delete a branch that has no data loaded besides a base schema generates the following error:

$ infrahubctl branch delete test

['BranchDelete'] The allocation of an extra 20.2 MiB would use more than the limit 3.4 GiB. Currently using 3.4 GiB. dbms.memory.transaction.total.max
threshold reached

The branch supposedly fails to delete, but I can recreate it as though it deleted without issue.

Here is the output from the logs:

|Worker 'InfrahubWorkerAsync ed77511d-f145-4038-a963-64e2386f1212' submitting flow run '59f48330-eba0-46d4-b5c7-9ce11a30d3b7'|info|5 minutes ago|
|Completed submission of flow run '59f48330-eba0-46d4-b5c7-9ce11a30d3b7'|info|5 minutes ago|
|Beginning flow run 'Delete branch test' for flow 'branch-delete'|info|5 minutes ago|
|Encountered exception during execution: TransientError('The allocation of an extra 20.2 MiB would use more than the limit 3.4 GiB. Currently using 3.4 GiB. dbms.memory.transaction.total.max threshold reached') Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1359, in run_context yield self File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1421, in run_flow_async await engine.call_flow_fn() File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1373, in call_flow_fn result = await call_with_parameters(self.flow.fn, self.parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/core/branch/tasks.py", line 300, in delete_branch await obj.delete(db=db) File "/source/backend/infrahub/core/branch/models.py", line 275, in delete await query.execute(db=db) File "/usr/local/lib/python3.12/site-packages/opentelemetry/util/_decorator.py", line 69, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/core/query/init.py", line 546, in execute results, metadata = await db.execute_query_with_metadata( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/database/init.py", line 390, in execute_query_with_metadata response = await self.run_query(query=query, params=params, name=name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/database/init.py", line 412, in run_query response = await execution_method.run(query=_query, parameters=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/neo4j/_async/work/session.py", line 328, in run await self._auto_result._run( File "/usr/local/lib/python3.12/site-packages/neo4j/_async/work/result.py", line 236, in _run await self._attach() File "/usr/local/lib/python3.12/site-packages/neo4j/_async/work/result.py", line 430, in _attach await self._connection.fetch_message() File "/usr/local/lib/python3.12/site-packages/neo4j/_async/io/_common.py", line 195, in inner await coroutine_func(*args, **kwargs) File "/usr/local/lib/python3.12/site-packages/neo4j/_async/io/_bolt.py", line 864, in fetch_message res = await self._process_message(tag, fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/neo4j/_async/io/_bolt5.py", line 1208, in _process_message await response.on_failure(summary_metadata or {}) File "/usr/local/lib/python3.12/site-packages/neo4j/_async/io/_common.py", line 254, in on_failure raise self._hydrate_error(metadata) neo4j.exceptions.TransientError: {code: Neo.TransientError.General.MemoryPoolOutOfMemoryError} {message: The allocation of an extra 20.2 MiB would use more than the limit 3.4 GiB. Currently using 3.4 GiB. dbms.memory.transaction.total.max threshold reached}|error|5 minutes ago|
|Finished in state Failed('Flow run encountered an exception: TransientError: {code: Neo.TransientError.General.MemoryPoolOutOfMemoryError} {message: The allocation of an extra 20.2 MiB would use more than the limit 3.4 GiB. Currently using 3.4 GiB. dbms.memory.transaction.total.max threshold reached}')|error|5 minutes ago|

h3. Expected Behavior

[| #expected-behavior]

The branch should delete without issue.

h3. Steps to Reproduce

[| #steps-to-reproduce]

infrahubctl branch delete test

h3. Additional Information

[| #additional-information]

I am running the latest version of infra hub and infrahubctl using docker-compose.

Metadata

Metadata

Assignees

Labels

group/backendIssue related to the backend (API Server, Git Agent)priority/2This issue stalls work on the project or its dependents, it's a blocker for a releasetype/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions