Skip to content
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
merged 7 commits into from
Sep 21, 2020

Conversation

MinasMazar
Copy link
Contributor

@MinasMazar MinasMazar commented Sep 11, 2020

Revert #30

We use the importer to extract relevant data from each row context, by implementing handle_row_result. Here we also add a default OrderImporter which extract data related to orders.

Ref. #35

@MinasMazar MinasMazar self-assigned this Sep 11, 2020
@MinasMazar MinasMazar marked this pull request as ready for review September 11, 2020 13:17
Flavio Auciello added 4 commits September 18, 2020 17:59
…-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 and others added 3 commits September 18, 2020 19:19
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 elia requested review from aldesantis and removed request for elia September 18, 2020 17:43
@elia elia merged commit 5d70fe0 into master Sep 21, 2020
@elia elia deleted the mm/fix-row-processor branch September 21, 2020 08:51
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