Skip to content

Commit 151814a

Browse files
committed
calculate diff in pc pipeline
1 parent 19d492f commit 151814a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/infrahub/message_bus/operations/requests/proposed_change.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ async def pipeline(message: messages.RequestProposedChangePipeline, service: Inf
132132

133133
await _gather_repository_repository_diffs(repositories=repositories)
134134

135+
destination_branch = await registry.get_branch(db=service.database, branch=message.destination_branch)
136+
source_branch = await registry.get_branch(db=service.database, branch=message.source_branch)
137+
component_registry = get_component_registry()
138+
async with service.database.start_transaction() as dbt:
139+
diff_coordinator = await component_registry.get_component(DiffCoordinator, db=dbt, branch=source_branch)
140+
await diff_coordinator.update_branch_diff(base_branch=destination_branch, diff_branch=source_branch)
135141
diff_summary = await service.client.get_diff_summary(branch=message.source_branch)
136142
branch_diff = ProposedChangeBranchDiff(diff_summary=diff_summary, repositories=repositories)
137143
await _populate_subscribers(branch_diff=branch_diff, service=service, branch=message.source_branch)

0 commit comments

Comments
 (0)