Resolve regression in OrderUpdater#log_state_change - #6318
Merged
tvdeyen merged 2 commits intoSep 5, 2025
Conversation
benjaminwil
force-pushed
the
order-updater-state-change-regression
branch
from
August 15, 2025 18:45
bcde800 to
0239bfe
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6318 +/- ##
=======================================
Coverage 89.34% 89.34%
=======================================
Files 961 961
Lines 20161 20161
=======================================
Hits 18012 18012
Misses 2149 2149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
benjaminwil
force-pushed
the
order-updater-state-change-regression
branch
from
August 15, 2025 20:46
0239bfe to
3a709e9
Compare
When the new asynchronous state change logging job was introduced in \solidusio#6304, the attributes saved to `spree_state_change` records was inadvertently changed to exclude the name of the model whose state was being changed. For example, when the order updater calls `log_state_change("payment")`, the state change record would have the name "payment" on it. Since the job was introduced all of the state change records created by the order updater would have a name "order". This commit simply exposes the change in behaviour so we can understand and resolve the issue more clearly. Co-Authored-By: Adam Mueller <adam@super.gd>
benjaminwil
force-pushed
the
order-updater-state-change-regression
branch
from
August 15, 2025 20:47
3a709e9 to
fe72d65
Compare
Contributor
Author
|
Just realized the first commit was doing more than it said it was doing. I've rebased to ensure that the first commit only exposes the issue and the second commit does the fixing. |
Whenever `Spree::OrderUpdater#log_state_change` was called, all state change records created would have a state change name of "order". This is a change in behaviour from Solidus historically and was inadvertently changed when we merged solidusio#6304. Co-Authored-By: Adam Mueller <adam@super.gd>
benjaminwil
force-pushed
the
order-updater-state-change-regression
branch
from
August 15, 2025 20:52
fe72d65 to
c0adc92
Compare
jarednorman
approved these changes
Aug 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When we merged #6304, we inadvertently changed the behaviour of
Spree::OrderUpdater#log_state_change, which used to log state changes with a name "payment" or "shipment" but now only logs state changes with the name "order".Checklist