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

Bug 312116

Summary: Project specific scheduling rule does not setup properly for mulitple modules case
Product: [WebTools] WTP ServerTools Reporter: Elson Yuen <eyuen7>
Component: wst.serverAssignee: Elson Yuen <eyuen7>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3 Flags: arvera: pmc_approved? (david_williams)
arvera: pmc_approved? (raghunathan.srinivasan)
arvera: pmc_approved? (naci.dai)
deboer: pmc_approved+
arvera: pmc_approved? (neil.hauge)
arvera: pmc_approved? (kaloyan)
Version: unspecified   
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/108946
Whiteboard: PMC_approved
Attachments:
Description Flags
v1.0 arvera: iplog+, arvera: review+

Description Elson Yuen CLA 2010-05-07 15:02:23 EDT
Build Identifier: 3.2 M7

In the new project specific publish lock rule, the logic is supposed to iterate through all the top level modules and their child modules to the scheduling rule.  

In the current code, some of the children are missing from the publish lock scheduling rule when there are multiple modules added to the server.

The problem is caused by logic on looping through the modules sometimes does not pass on the proper module list to the module visitor.


Reproducible: Always
Comment 1 Elson Yuen CLA 2010-05-07 15:02:38 EDT
Angel, please assign this one to me.
Comment 2 Elson Yuen CLA 2010-05-07 15:04:57 EDT
Created attachment 167541 [details]
v1.0

This patch will fix the modules pass on to the publish modules to make sure the scheduling rule contains all modules and its child modules.
Comment 3 Angel Vera CLA 2010-05-11 09:56:11 EDT
Elson, 
Please provide the PMC template as per: http://wiki.eclipse.org/index.php/WTP_PMC_Defect_Review
Comment 4 Angel Vera CLA 2010-05-11 13:44:22 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
This is a new function that doesn't work as expected. We ought to fix new function added, so adopter can correctly make use of it. 

* Is there a work-around? If so, why do you believe the work-around is insufficient? 
the workaround is to not use the new enhanced project publish lock, and revert back to the old workspace lock

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Elson will comment on this.

* Give a brief technical overview. Who has reviewed this fix? 
Angel reviewed the patch, and it looks good. 

* What is the risk associated with this fix? 
low
Comment 5 Elson Yuen CLA 2010-05-11 13:55:18 EDT
Comment on the testing involved:
The changed code will only get called when the project specific lock is enabled.  Therefore, only the project specific lock scenarios are tseted.

Scenarios tested:
1. Add 1 EAR project with a web project and an EJB project to the server and do a publish. Only the EAR projects, web, EJB project and the server object are added to the scheduling rule (by inspecting the lock rule) 
2. Add another EAR project with another web and another EJB project to the server and publish again.  Only the boths EAR projects with their corresponding child modules and the server object are added to the scheduling rule (by inspecting the lock rule).
3. Add a utility module under the 2nd web and publish again.  Both EARs with all its child module, the new utility module and the server object are on the scheduling rule.

The scheduling rule is difficult to test using JUnit since it need to try modifying resources on a long standing publish to check on it. Therefore, no Junit test is added to test this.
Comment 6 Angel Vera CLA 2010-05-11 16:46:54 EDT
changes committed to HEAD
Comment 7 Angel Vera CLA 2010-05-11 17:10:44 EDT
Changes released to HEAD
Comment 8 Eclipse Genie CLA 2017-10-11 16:33:24 EDT
New Gerrit change created: https://git.eclipse.org/r/108946