Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356774

Summary: ValidationService#queueAll() fails if two entities of different type have same UUID
Product: z_Archived Reporter: Michael Ochmann <michael.ochmann>
Component: SkalliAssignee: Michael Ochmann <michael.ochmann>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Ochmann CLA 2011-09-06 04:04:23 EDT
Instances of the entity type Issues share their UUID with the project they belong to. ValidationService#queueAll() adds all entities of all types to the queue, means: If a project is added to the queue also its associated Issues instance is added to the queue. Project is validated producing some issues that are persisted with the project's UUID as key (category: Issues). Afterwards the Issues instance is validated (which usually has no issues) and the result is persisted with the UUID of the Issues instance --- which is the same as that of the project! Result: the issues of the project are replaced by those of the Issues instance, which is obviously not intended.

Possible solutions:
* let Issues instances have their own UUID and store the project's UUID in a field. Problem: There is not yet a data migration mechanism for Issues.
* persist issues of different entity types under different categories in StorageService. Problem: currently category is hard-wired to the class name of the entity.
Comment 1 Michael Ochmann CLA 2011-10-12 09:56:25 EDT
Found a third variant: Just exclude issues from the validation for the time being.
If we ever run into this problem again (which we shouldn't since entities should not share the same UUID), we can think about a better solution.

http://git.eclipse.org/c/skalli/org.eclipse.skalli.git/commit/?id=281783c84986e3710df819ecdff8b1b923326523