Make SimpleCoordinator inventory_units keyword arg#6483
Open
sofiabesenski4 wants to merge 1 commit into
Open
Conversation
We want to support additional keyword arguments to this class and a positional argument interferes with this. Co-authored-by: Jared Norman <jared@super.gd> Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6483 +/- ##
==========================================
- Coverage 89.68% 89.67% -0.01%
==========================================
Files 991 991
Lines 20832 20835 +3
==========================================
+ Hits 18683 18684 +1
- Misses 2149 2151 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6b44d32 to
b67737d
Compare
jarednorman
approved these changes
May 14, 2026
Member
|
Just to call this out for anyone else on core reviewing it: we realized that the unit tests for the coordinator don't actually ever use this argument, which is not ideal. |
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
For future improvements, we need to support additional keyword arguments to this class. The current
inventory_unitspositional argument interferes with this.In this commit we preserve the existing positional argument behaviour, while allowing keyword arguments to be passed in instead. This makes upgrades easier for existing projects since it does not break the existing behaviour.
Next Steps
We are working to provide a configurable replacement for the Spree::Stock::SimpleCoordinator, utilizing the middleware design pattern for increased configurability and extensibility.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: