Enhancement
Major
Detail
Major
Detail
Detail
#26379
Replay migration fails because DependencyInjection does not take place
For example, the tl:EventRewriters for migration get the log or the tl:MORepository via dependency injection. Unfortunately, however, the "Inject" is not executed for them because they are created at the wrong time with the wrong tl:InstantiationContext. They would have to be created in DataMigration.createInsertSQL. That's where the tl:GuiceContext is created and inject is called. But instead they are indirectly contained as tl:InstanceFormat in the com.top_logic.knowledge.service.migration.MigrationConfig. And this is read into ImportDataDialog. dumpUploaded(Object) using MigrationUtil. buildMigration. The wrong tl:InstantiationContext is created here: MigrationUtil.readMigrationConfig
When implementing this ticket, it is important to note that there are two call paths for the migration: One is the JSP and the other is launching the application. See the calls to the tl:DataMigration constructor for this.
Furthermore, regression tests should of course be introduced, which test the dependency injection in both cases.
Test
- test-app-rewrite from #26798