Deprecate tracker migration

Created on 19 March 2021, about 3 years ago
Updated 9 January 2024, 5 months ago

Postponed on πŸ“Œ Create a way to declare a plugin as deprecated Needs work .

Problem/Motivation

#2500535: Upgrade path for Tracker 7.x β†’ introduced a migration for the tracker module. It should be a very simple migration since it's one of the very few that's pretty much just copying a DB table.

  1. The first problem: dependencies. Even though #2500535-5: Upgrade path for Tracker 7.x β†’ .10 asked for migration dependencies to be added and #2500535-11: Upgrade path for Tracker 7.x β†’ added those, they're wrong.
  2. The second problem is far worse: nothing about the migration is correct 😨. The tests don't test the migration, but the source DB. The migrations themselves try to migrate into user and node entities, which makes no sense.

Steps to reproduce

Proposed resolution

While this migration is not needed running it does not cause problems on the destination. See #5 and #10.
Leaving as postponed because it can be done when this is moved to the contrib project.

Original proposed resolution

Fix all this:

  1. +++ b/core/modules/tracker/migration_templates/d7_tracker_node.yml
    @@ -0,0 +1,15 @@
    +  nid: nid
    

    No migration lookup, which means that changed node IDs will fail to have their tracker data correctly migrated.

  2. +++ b/core/modules/tracker/migration_templates/d7_tracker_node.yml
    @@ -0,0 +1,15 @@
    +migration_dependencies:
    +  required:
    +    - d7_user
    

    This is only depending on d7_user but it also needs d7_node.

  3. +++ b/core/modules/tracker/migration_templates/d7_tracker_user.yml
    @@ -0,0 +1,16 @@
    +process:
    +  nid: nid
    +  uid: uid
    +  published: published
    +  changed: changed
    +destination:
    +  plugin: entity:user
    +migration_dependencies:
    +  required:
    +    - d7_user
    

    … same here.

  4. +++ b/core/modules/tracker/migration_templates/d7_tracker_node.yml
    @@ -0,0 +1,15 @@
    +destination:
    +  plugin: entity:node
    

    This sends the tracker source data to … not the tracker_node table in D8|9 … but to the node entity.

  5. +++ b/core/modules/tracker/migration_templates/d7_tracker_user.yml
    @@ -0,0 +1,16 @@
    +destination:
    +  plugin: entity:user
    

    This sends the tracker source data to … not the tracker_user table in D8|9 … but to the user entity.

  6. +++ b/core/modules/tracker/src/Tests/Migrate/d7/MigrateTrackerNodeTest.php
    @@ -0,0 +1,74 @@
    +  public function testMigrateTrackerNode() {
    +    $connection = Database::getConnection('default', 'migrate');
    

    This is a test.

    But it tests not the migration.

    It tests the _source DB_ 😳

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
TrackerΒ  β†’

Last updated 16 days ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024