Postponed on #2687843: Add back incremental migrations through the UI
Problem/Motivation
A review of the patch in #2687843: Add back incremental migrations through the UI comment #98 included some points that were outside the scope of the issue and need to be addressed.
The relevant is in comment#99
This is a copy of the points to be addressed in this issue
Now in IncrementalForm.
2. +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
@@ -236,6 +244,51 @@ public function submitOverviewForm(array &$form, FormStateInterface $form_state)
+ $database_state_key = $this->state->get('migrate.fallback_state_key', '');
+ if ($database_state_key) {
Why would we use the fallback state key here? The user has entered explicit database credentials here, so I don't understand why we wouldn't just use those.
Now in OverviewForm.
3. +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
@@ -236,6 +244,51 @@ public function submitOverviewForm(array &$form, FormStateInterface $form_state)
+ $form_state->setValue('step', 'credentials');
+ $form_state->setRebuild();
Nit: setValue() is chainable, so we could do ->setValue()->setRebuild().
Now in MigrateUPgradeFormBase.
4. +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
@@ -848,6 +877,44 @@ protected function getDatabaseTypes() {
+ * Setup migrations.
+ *
+ * @param array $database
+ * Database array representing the source Drupal database.
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
+ * The current state of the form.
+ */
+ protected function setupMigrations(array $database, FormStateInterface $form_state) {
Can this doc comment be expanded a bit? "Setup migrations" tells me nothing more than the method name already does.
Now in CredentialForm.
5. +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
@@ -848,6 +877,44 @@ protected function getDatabaseTypes() {
+ $form_state->set('version', $version);
+ $form_state->set('migrations', $migration_array);
Nit: ->set() is chainable.
10. +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
@@ -315,4 +281,110 @@ protected function translatePostValues(array $values) {
+ * @param $session
+ * The currenct session.
$session needs a type hint (also in the method signature), and there's a typo in 'current'.
11. +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
@@ -315,4 +281,110 @@ protected function translatePostValues(array $values) {
+ * @param $session
+ * The currenct session.
+ */
+ protected function assertIdConflict($session) {
$session needs to be type hinted, and 'current' is misspelled. :)
12. +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
@@ -315,4 +281,110 @@ protected function translatePostValues(array $values) {
+ // Have to reset all the statics after migration to ensure entities are
'statics' should be 'static caches'.
Proposed resolution
2. The section of code is being removed in #2679835: Improve exception handling in Migrate UI
3. It is no longer relevant, the form step is stored in temp private store.
4. Already fixed in another issue.
5. These lines are no longer in the code and the form uses the temp private store for form information.
10. Already fixed in another issue.
11. Already fixed in another issue.
Remaining tasks
12. Fixed in this issue.
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff_6-8.txt | 802 bytes | RytoEX |
#8 | 2936002-8.patch | 796 bytes | RytoEX |
#6 | 2936002-6.patch | 728 bytes | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedRemove the duplicate title and correct the year in the tag.
Comment #4
heddnNo longer blocked.
Comment #5
quietone CreditAttribution: quietone as a volunteer commentedTagging
Comment #6
quietone CreditAttribution: quietone as a volunteer commentedSince this issue was created the UpgradeForm has been split into several files. The IS is updated to include the file where the code now resides, if it has moved..
2. The section of code is being removed in #2679835: Improve exception handling in Migrate UI
3. It is no longer relevant, the form step is stored in temp private store.
4. Already fixed in another issue.
5. These lines are no longer in the code and the form uses the temp private store for form information.
10. Already fixed in another issue.
11. Already fixed in another issue.
12. Fixed in this patch.
Comment #7
quietone CreditAttribution: quietone as a volunteer commentedline longer than 80 characters
Comment #8
RytoEX CreditAttribution: RytoEX as a volunteer commentedAddressed #7 to keep this going. Interdiff is nearly identical, but attached here anyway.
Comment #9
heddnUpdated the IS to basically copy from #6. And that means this is RTBC.
Comment #10
alexpottComment #11
alexpottCommitted and pushed c5187032aa to 8.6.x and a9d737163e to 8.5.x. Thanks!
btw. I would have removed the "Have to" since that is redundant.