Problem/Motivation

I don't think we need to tag the tests for migrate, migrate_drupal and migrate_drupal_ui any longer with @group legacy

Proposed resolution

Remove the annotation.

Remaining tasks

  • Remove it
  • Fix any issues
  • Commit

User interface changes

API changes

Data model changes

Release notes snippet

Comments

heddn created an issue. See original summary.

heddn’s picture

Status: Active » Needs review
StatusFileSize
new4.78 KB
longwave’s picture

Status: Needs review » Reviewed & tested by the community

I don't see why these are legacy either, so RTBC.

longwave’s picture

In fact there are a few more migrate-related tests that have @group legacy, should these tags be removed too?

core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php
core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php
core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php
core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserConfigsTranslationTest.php
core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateUserProfileFieldInstanceTranslationTest.php
core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php
core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php
core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php
core/modules/migrate_drupal/tests/src/Functional/MigrateDrupalUpdateTest.php
core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php
core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php
core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php
core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php
core/modules/text/tests/src/Unit/Migrate/d7/TextFieldTest.php
quietone’s picture

The title states this is removing @group legacy from migrate tests, but it is then limited to the migrate modules. Shouldn't this cover all migration tests in core?

quietone’s picture

Status: Reviewed & tested by the community » Needs work

I didn't reload the page and missed comment #4. I agree, lets do all the migrate tests in core.

aleevas’s picture

Status: Needs work » Needs review
StatusFileSize
new34.09 KB
new33 KB

Was removed all @group legacy that mentioned in #4

longwave’s picture

Status: Needs review » Needs work

We can't remove the group from all tests, this is only about migrate related ones.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new10.77 KB
quietone’s picture

Status: Needs review » Needs work

I applied the patch and did 'grep -r '@group legacy' core'. There were 43 instances found, none of which are related to migrate. So, looking good.

However,

+++ b/core/modules/migrate_drupal/tests/src/Functional/MigrateDrupalUpdateTest.php
@@ -27,7 +26,7 @@ protected function setDatabaseDumpFiles() {
-  public function testSourceFeedRequired() {
+  public function testMigrateDrupalMultilingualUninstalled() {

this rename is out of scope.

quietone’s picture

Issue tags: +Novice

The change above is straightforward, this is suitable for a novice.

ridhimaabrol24’s picture

StatusFileSize
new10.32 KB
new678 bytes

Did the changes as mentioned in #10.

ridhimaabrol24’s picture

Status: Needs work » Needs review
quietone’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@ridhimaabrol24, thanks the change looks good.

I redid the steps in #10 just to be sure. There was a failing test but it was unrelated so I retested the patch and it passes all tests. Onward.

xjm’s picture

Do we know why these were marked legacy in the first place? I blamed the first one and it was introduced in #2409435-87: Upgrade path for Book 6.x and 7.x (comment 87 of that issue) without specific explanation, but the test hadn't been failing in the patch before that.

xjm’s picture

Adding reviewer credit. Also leaving credit for @aleevas for #7, but in the future please read the issue more carefully to get credit. Thanks!

alexpott’s picture

These were probably marked legacy because of deprecated plugins.

For example in D8 there's \Drupal\Tests\book\Kernel\Plugin\migrate\source\BookTest::testDeprecatedPlugin() The patch that removed that should have remove this.

Also running \Drupal\Tests\migrate_drupal\Unit\MigrationStateUnitTest in D8 without the legacy group triggers

  2x: Using migration plugin definitions to determine the migration state of the module 'link' is deprecated in Drupal 8.7. Add the module to a migrate_drupal.yml file. See https://www.drupal.org/node/2929443
    2x in MigrationStateUnitTest::testGetUpgradeStates from Drupal\Tests\migrate_drupal\Unit

Some of them don't trigger deprecations in D8 either.

I think we should have a follow-up issue to evaluate the other 43 instances in D9 core and remove them. But I also think that doing this on its own is fine. It's great to be sure that we're not triggering deprecated code in Drupal 9 migration tests.

alexpott’s picture

Version: 9.1.x-dev » 9.0.x-dev

Backported to 9.0.x as this is a test only change.

  • alexpott committed 15c4512 on 9.1.x
    Issue #3134459 by ridhimaabrol24, aleevas, longwave, heddn, quietone,...

  • alexpott committed 652e4d1 on 9.0.x
    Issue #3134459 by ridhimaabrol24, aleevas, longwave, heddn, quietone,...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed
xjm’s picture

Issue tags: +Needs followup

To review the other 43.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.