Skip to content

Commit af5b943

Browse files
committed
calculate diff in pc pipeline
1 parent 99ae337 commit af5b943

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
@@ -134,6 +134,12 @@ async def pipeline(message: messages.RequestProposedChangePipeline, service: Inf
134134

135135
await _gather_repository_repository_diffs(repositories=repositories)
136136

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

0 commit comments

Comments
 (0)