Deprecate tracker migration

Created on 19 March 2021, over 3 years ago
Updated 9 January 2024, 12 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 7 months 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.71.5 2024