-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find another way to "preserve context between rows processing" #38
Merged
Conversation
This file contains 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
MinasMazar
force-pushed
the
mm/fix-row-processor
branch
from
September 11, 2020 12:58
79c72d3
to
6248822
Compare
elia
force-pushed
the
mm/fix-row-processor
branch
from
September 18, 2020 15:53
6248822
to
91e8558
Compare
…-import" The post-processors code also introduced change in the context that made it permanent across rows. This led to bugs due leaked information between rows (see issue #35 for details about the errors). The gist of this revert is the removal of call to #dup on the context. This reverts commit 1c9685b, reversing changes made to 644ba81.
Order imports are not working as expected and it's better to advertise them as an experimental feature until they're proven stable.
Before this change the use of `stub_const('CustomImporter', SolidusImporter::BaseImporter)` was actually tying the stubbed constant to `SolidusImporter::BaseImporter`. So any change done to `CustomerImporter` was not properly reverted after the example was finished.
It was being invoked after each row process, but I think it was intended to be used like its counterpart `before_import`, which is **not** invoked before each row process, but before the whole process import.
elia
force-pushed
the
mm/fix-row-processor
branch
from
September 18, 2020 16:27
91e8558
to
114298f
Compare
We need to share something between rows because orders are defined by multiple rows, and we need to accumulate data before trying to create them. We use the importer to extract relevant data from each row context, by implementing `handle_row_import`. Ref. #35
We need the to be able to recalculate the order and ensure all totals are updated.
elia
force-pushed
the
mm/fix-row-processor
branch
from
September 18, 2020 17:43
114298f
to
0a23071
Compare
aldesantis
approved these changes
Sep 21, 2020
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.
Revert #30
We use the importer to extract relevant data from each row context, by implementing
handle_row_result
. Here we also add a defaultOrderImporter
which extract data related to orders.Ref. #35