Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It would be great to see this module tested with a "real" Drupal 7 migration.
Proposed resolution
Create a Drupal 7 migration fixture (with DB and files) and (at least) a kernel test that tests the expected outcome.
Remaining tasks
Must-have's:
Create a Drupal 7 migration fixture.Done.Create a kernel test.Done.Enable automated tests for this project. I think that certain DB queries will fail with PostreSQL, so the initial test env(s) should use MySQL or SQLite.
Could-have's:
- The above for Drupal 6 → Drupal 8|9 migration
- A functional test that uses core's Migrate Drupal UI module
- A functional test that uses Migrate Upgrade and Drush
Additional info
The test will pass if you apply the following patches (sorted list):
- #3164697-3: migrations/d7 directory
- #3170195-3: Migrate conditions of type "contains"
#3113558: Submission data values are not savedThis is not required anymore.- #3172154-10: Fix source plugin's undefined index issues, schema issues and unnecessary trailing whitespaces and empty lines
- #3172161-2: Fix the migration of option selects with groups
- #3172162-2: Adjust (the correct) value for webform submission's URI
- #3172176-2: D7 Fix the migration of nested values, multi-value field types (e.g. checkboxes) and handle 'grid' type submission values
- #3172417-5: [PP-1] d7_webform_submissions migrates uid without using migration lookup
Comment | File | Size | Author |
---|---|---|---|
#32 | webform_migrate-kernel_test-3172139-32.patch | 2.69 KB | jienckebd |
#19 | webform_migrate-kernel_test-3172139-19.patch.patch | 875.54 KB | Matroskeen |
|
Issue fork webform_migrate-3172139
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 8.x-1.x changes, plain diff MR !7
- 3172139- compare
- 3172139-enable-project-testing changes, plain diff MR !5
Comments
Comment #2
huzookaComment #3
huzookaComment #4
huzookaComment #5
huzookaComment #6
huzookaComment #7
huzookaI just have updated #3172154: Fix source plugin's undefined index issues, schema issues and unnecessary trailing whitespaces and empty lines, and now I have to update the test.
Comment #9
huzookaComment #10
huzookaUpdated the patch list.
Comment #12
MatroskeenEven if the annotation is there, it still complains about missing webform module 🤔
Maybe there is something wrong with MR flow, trying with a patch.
Comment #14
Matroskeentrying with
--binary
flagComment #16
andriyun CreditAttribution: andriyun as a volunteer and at Bellcom, Drupal Ukraine Community for Drupal Ukraine Community commentedAutomated tests enabled
Comment #17
andriyun CreditAttribution: andriyun as a volunteer and at Bellcom, Drupal Ukraine Community for Drupal Ukraine Community commented1.
Type for time werbform element should be `webform_time`
2. Missing '#step' attribute
it's present in webform source `"minuteincrements";s:1`
Comment #18
andriyun CreditAttribution: andriyun as a volunteer and at Bellcom, Drupal Ukraine Community for Drupal Ukraine Community commentedAdjusted assert
Comment #19
MatroskeenFor some reason, it doesn't fetch external dependencies with the merge request flow. Re-uploading the MR content as a patch.
Comment #20
huzookaI miss the interdiff, but 🥳!
Comment #21
huzookaI'm using the files in this patch/mr for doing some integration testing.
This is a diff which is identical to #19, but makes anyone able to apply it on top of the distributed release of Webform Migrate.
Comment #23
andriyun CreditAttribution: andriyun as a volunteer and at Bellcom, Drupal Ukraine Community for Drupal Ukraine Community commentedI've added commit with changes in #19
The rest of work moved out to followup issue #3206977: Drupal 6 - Add kernel tests, source database, files
Thanks
Comment #26
andriyun CreditAttribution: andriyun as a volunteer and at Bellcom, Drupal Ukraine Community for Drupal Ukraine Community commented@huzooka
I’ve managed to get tests passed when they run by Drupal CI from merge request.
There were missing some dependencies in composer.json
And default values where treated strange. So I changed them to custom values.
Please review changes in MR7 https://git.drupalcode.org/project/webform_migrate/-/merge_requests/7/di...
Comment #27
Matroskeen@andr1yun asked me to take a look, so I added my thoughts to the merge request.
It seems like a nice workaround, but it looks like a bug in the test runner that would be great to fix. I asked in #drupal-infrastructure Slack channel to verify.
Comment #28
huzookaYou can also execute the migrations with Migrate Drupal UI, so afaik Migrate Tools must not be a dependency.
Comment #29
MatroskeenIt was confirmed in #drupal-infrastucture that dependencies should be specified in composer.json to work properly with merge requests, so we're going into the right direction.
See: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...
Comment #31
jienckebd CreditAttribution: jienckebd as a volunteer commentedComment #32
jienckebd CreditAttribution: jienckebd as a volunteer and at Acquia commentedIt seems that the kernel tests are failing because of schema changes in Webform 6.
The attached patch helps these tests pass.