Skip to content

fix: send revoke line items signal from order returned task#534

Merged
bseverino merged 2 commits into
mainfrom
bseverino/RV2U-321-move-revoke-signal
Apr 14, 2026
Merged

fix: send revoke line items signal from order returned task#534
bseverino merged 2 commits into
mainfrom
bseverino/RV2U-321-move-revoke-signal

Conversation

@bseverino

@bseverino bseverino commented Apr 14, 2026

Copy link
Copy Markdown
Member

Revoke line items task is not being triggered from fulfill_order_returned_signal. Create a separate signal for the revoke line items task and manually call it from the order returned task once the return is successful.

Internal ticket: https://redventures.atlassian.net/browse/RV2U-473

Merge checklist:
Check off if complete or not applicable:

  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

Post-merge:

@bseverino bseverino force-pushed the bseverino/RV2U-321-move-revoke-signal branch from 3bebaa6 to 1f18525 Compare April 14, 2026 14:10
@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  commerce_coordinator/apps/commercetools
  signals.py
  commerce_coordinator/apps/commercetools/sub_messages
  tasks.py
  commerce_coordinator/apps/commercetools/tests
  test_signals.py
  commerce_coordinator/apps/commercetools/tests/sub_messages
  test_tasks.py
Project Total  

This report was generated by python-coverage-comment-action

@bseverino bseverino marked this pull request as ready for review April 14, 2026 14:24
@bseverino bseverino requested a review from a team as a code owner April 14, 2026 14:24
Copilot AI review requested due to automatic review settings April 14, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes revoke-line-items processing for returned orders by introducing a dedicated coordinator signal and dispatching it directly from the “order returned” task after return handling completes.

Changes:

  • Added a new fulfill_order_returned_send_revoke_line_items_signal and wired it in CC_SIGNALS to the existing revoke_line_items receiver.
  • Removed revoke_line_items from the fulfill_order_returned_signal receiver list and instead manually dispatched the new signal from fulfill_order_returned_signal_task.
  • Updated/expanded unit tests to assert the new signal dispatch behavior from the returned-order task and to validate the signal-to-task wiring.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
commerce_coordinator/settings/base.py Adds new signal wiring for revoke-line-items and removes the old wiring from fulfill_order_returned_signal.
commerce_coordinator/apps/commercetools/signals.py Defines the new coordinator signal.
commerce_coordinator/apps/commercetools/sub_messages/tasks.py Dispatches the new signal from fulfill_order_returned_signal_task.
commerce_coordinator/apps/commercetools/tests/test_signals.py Updates the signal receiver test to use the new signal.
commerce_coordinator/apps/commercetools/tests/sub_messages/test_tasks.py Adds assertions that the revoke signal is dispatched (or not) in key execution paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread commerce_coordinator/apps/commercetools/sub_messages/tasks.py Outdated
@bseverino bseverino merged commit 928617f into main Apr 14, 2026
8 checks passed
@bseverino bseverino deleted the bseverino/RV2U-321-move-revoke-signal branch April 14, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants