Bug 518289 - Implicit dependency between 2 migration contributions DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant and NoteShapeDefaultLabelAlignmentMigrationParticipant
Summary: Implicit dependency between 2 migration contributions DRepInDViewToRootObject...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 5.0.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: Next   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 518644
Blocks: 529263
  Show dependency tree
 
Reported: 2017-06-15 05:16 EDT by Minh Tu Ton That CLA
Modified: 2018-09-05 08:32 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Minh Tu Ton That CLA 2017-06-15 05:16:23 EDT
Hi,

During the migration of aird, migration contributions are called (see org.eclipse.sirius.business.internal.migration.AbstractSiriusMigrationService.postLoad(XMLResource, String)). I've just been aware that there must be a dependence between the contribution NoteShapeDefaultLabelAlignmentMigrationParticipant and the contribution DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant. If the latter is not called before the former, the migration of note alignment is not performed. 
While running a test with Tycho, the order of plugin loading is org.eclipse.sirius.diagram.ui then org.eclipse.sirius which makes the contribution NoteShapeDefaultLabelAlignmentMigrationParticipant precede the the contribution DRepInDViewToRootObjectsAndWithDRepDescRepPathMigrationParticipant in the list.
Is it a must to assure the dependency between migration contributions somehow ?
Comment 1 Pierre-Charles David CLA 2017-06-15 10:54:35 EDT
I'll try to test later, but it looks like we should indeed guarantee the particpants are executed in a deterministic and chronological order. https://git.eclipse.org/r/#/c/94974/ may be enough, but further investigation is needed.

Is the problem systematic in you case when you run your tests under Tycho?
Comment 2 Minh Tu Ton That CLA 2017-06-15 11:30:20 EDT
Yes, it's systematic. Our current workaround is to ensure the dependency order of sirius plugins in the test plugin.
Comment 3 Pierre-Charles David CLA 2017-12-28 03:40:58 EST
There are several other related issues regarding migration participants and their coordination (#519596, #506226, #518644). We'll try to have a more global look on these for 6.0.