Closed (fixed)
Project:
Recipe
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2021 at 12:49 UTC
Updated:
4 Mar 2023 at 18:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
srishtiiee commentedComment #3
srishtiiee commentedComment #4
srishtiiee commentedComment #5
srishtiiee commentedComment #6
srishtiiee commentedComment #7
srishtiiee commentedComment #8
srishtiiee commentedComment #10
srishtiiee commentedComment #12
srishtiiee commentedComment #13
srishtiiee commentedComment #14
wim leersThis is hardening the migration that #2908884: Migrate data from 7.x-2.x to 8.x-2.x introduced 👍🥳
Comment #15
huzookaReview of #12 (part one):
This entirely removes the previous
recipe71_recipenode &recipe71_recipe_translationnode translation migrations. Why?1. Because these were creating additional node revisions on the destination site (this breaks revision history).
2. They didn't care of updating previous revisions.
3. They were unaware that the preferred node migration method is executing
d7_node_completemigrations (which are migrating every single node revision including all the revision translations as well).Instead of using the removed standalone migrations, the patch simply adds the required field process pipeline to recipe node migrations...
...and adds the actual migration row source properties (representing recipe field values) in a migrate prepare hook.
Same happens in ingredients submodule.
But the patch only fixes the Recipe 7.x-1.x → Recipe 8.x-2.x migration path.
Test is updated with a
@dataProviderwhich tests recipe node migrations with the obsolete (d7_node,d7_node_translation) and either with complete (d7_node_complete) migrations.These are only simple argument order change:
PHPUnit\Framework\Assert::assertSame()'s first argument should be the expected value, and the second one should be the actual value.Comment #16
huzookaThere are many-many coding standard fixes in the patch which are out of the scope of the current issue. Could you please remove them?
Keep the original.
Keep the original.
Keep the original.
Keep the original.
Added a missing function doc...
..and again.
A lot of minor fixes.
..as well as this one.
...
I want to ask for two things:
@srishti.bankar, it is clear that you have put a tremendous amount of work into fixing coding standard errors as well. But unfortunately they're making it very difficult to review the patch. 🤯
Could you please open a new issue for fixing these CS violations? And then please undo every single unrelated coding standard fixes what you've made in #12. If you do this, then the reversed interdiff could be uploaded to the newly created issue, and the tremendous work you have put into it would not be lost 🥳.
🤔 Patch #12 only fixes Recipe 7.x-1.x → Recipe 8.x-2.x migration path (see #15.5). Can we decrease the scope of this issue? Let's say "Harden migrations of Recipe 7.x-1.x". Doing so may help this patch to be committed much sooner 🥳.
Comment #17
srishtiiee commentedRemoved unrelated coding standard fixes.
Comment #18
huzookaIt would be very nice tho add some comments here why we suppress these exceptions.
Why was this assertion removed? It is definitely unrelated to 7.x-1.x recipe migrations.
We shouldn't suppress any unrelated (unknown or unforeseen) exceptions. Please remove!
Could you please remove the blank line at the first line of foreach loop's body?
For other reviewers:
The "new" coding standard error isn't new, it complains about this line: https://git.drupalcode.org/project/recipe/-/blob/8.x-2.x/recipe.module#L177
I guess this wasn't picked up when the dev branch was tested in January (9 months ago).
Comment #19
huzookaAddressing #18.2
This patch restores the original state of the migration tests for Recipe 6.x-1.x and Recipe 7.x-2.x.
Comment #20
srishtiiee commentedFixed issues listed in #18.
Comment #21
wim leersBecause of #3067979: Exclude test files from release packages, the patch in #20 does not apply to packaged releases!!!!!!!!!! 🤯
This forces me to upload a version of #20 without test changes.
This patch has been ready since #20 — everything in @huzooka's reviews has been addressed, and there is test coverage to prove it works!
Comment #22
dcam commentedWhen the module is tested on PHP 8.1 the 7.x-1.x migration starts causing one of those cryptic "Uncaught AssertionError: The container was serialized." errors. Since this patch eliminates that migration, I decided to review it finally.
Using a trait outside the scope of a class is deprecated. So I'm copying the code from that trait into the
tryblock. I think we can also simplify the logic here and just return if any exception is thrown.I'm slightly concerned about naming collisions here, so I'm making the tag name more specific. It probably doesn't matter at all, but it also won't hurt to tweak it.
I don't understand the reason for this change.
Or this change.
Or this change and the corresponding addition of the node_access table to the fixture.
Removing those changes didn't cause the tests to fail locally, so I'm taking them out of the patch.
Comment #23
dcam commentedI missed removing an additional fixture change for the node_access table.
Comment #25
dcam commentedThank you all for your contributions!