Skip to content

Skip suppliers on terminal cancel regardless of result#423

Merged
jakub-id merged 2 commits intomainfrom
crosslink-220
Feb 26, 2026
Merged

Skip suppliers on terminal cancel regardless of result#423
jakub-id merged 2 commits intomainfrom
crosslink-220

Conversation

@jakub-id
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 25, 2026 18:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the broker workflow so that when a requester sends a “terminal” cancel addressed to the broker symbol, remaining new suppliers are skipped immediately (rather than waiting for a supplier cancel response), while still forwarding supplier cancel responses appropriately.

Changes:

  • Move “skip new suppliers on broker-symbol cancel” behavior into RequesterMessageReceived via a new terminalCancel(...) helper.
  • Rename handleAndCheckCancelResponse to shouldForwardSAM and adjust logic so broker-symbol cancel responses are forwarded without re-skipping suppliers.
  • Update and extend workflow tests to cover the new terminal-cancel behavior and the renamed helper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
broker/service/workflow.go Implements terminal-cancel detection and skips new suppliers on broker-symbol cancel; renames cancel-response forwarding helper.
broker/service/workflow_test.go Updates existing tests for renamed helper and adds coverage for broker vs supplier cancel behavior in RequesterMessageReceived.
Comments suppressed due to low confidence (1)

broker/service/workflow.go:154

  • Log message contains a duplicated word ("failed to to find...") which looks like a typo and makes log searching harder. Update the message to remove the extra "to".
	lastEvent, err := w.eventBus.GetLatestRequestEventByAction(ctx, illTransId, string(iso18626.TypeActionCancel))
	if err != nil {
		ctx.Logger().Error("failed to to find last event with action cancel", "error", err)
		return true

@jakub-id jakub-id merged commit c405f1c into main Feb 26, 2026
3 checks passed
@jakub-id jakub-id deleted the crosslink-220 branch February 26, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants