Bug 379273 - jpa diagram editor code does not compile against graphiti 0.9 release
Summary: jpa diagram editor code does not compile against graphiti 0.9 release
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Diagram Editor (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Tran Le CLA
QA Contact: Petya Sabeva CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 11:47 EDT by Karen Butzke CLA
Modified: 2012-05-30 17:30 EDT (History)
4 users (show)

See Also:
neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved? (neil.hauge)
kaloyan: pmc_approved+
neil.hauge: pmc_approved? (cbridgha)
neil.hauge: review+


Attachments
Build JPA Diagram Editor against the Juno version of Graphiti (22.06 KB, patch)
2012-05-14 11:04 EDT, Petya Sabeva CLA
no flags Details | Diff
p2Director install log file (1.26 KB, text/plain)
2012-05-24 02:03 EDT, Tran Le CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2012-05-11 11:47:19 EDT
In the WTP build the graphiti 0.8 release is still used for compiling the JPA Diagram Editor. I used the juno update site to get WTP M7 and this pulled the latest Graphiti which is 0.9. The diagram editor plug-ins do not compile against 0.9, some methods have been removed or made internal.
Comment 1 Petya Sabeva CLA 2012-05-14 11:04:47 EDT
Created attachment 215573 [details]
Build JPA Diagram Editor against the Juno version of Graphiti
Comment 2 Neil Hauge CLA 2012-05-14 13:41:35 EDT
Petya, can you elaborate on any testing that was performed, such as manual or automated tests?  Also, Let me know if this will still compile against 0.8, or whether we need to coordinate the build dependency change.
Comment 3 Petya Sabeva CLA 2012-05-15 02:53:22 EDT
The fix is tested manually and all automated tests passed successfully. Except that the build dependency has to be changed, because some methods and classes in 0.8 are deleted/renamed and new ones are introduced in 0.9, so the JPA diagram editor does not compile against Graphiti 0.8 any more.
Comment 4 Neil Hauge CLA 2012-05-15 10:03:02 EDT
Tran,

We need to update the Graphiti dependency to the latest 0.9 milestone.  See the "Milestones" section on this page for the M7 download options.

http://www.eclipse.org/graphiti/download.php

It needs to happen in coordination with the release of this patch.  Let me know how you want to proceed.  Also, let me know if we need to pull Carl in to help with this.


Also need to get PMC approval.
Comment 5 Neil Hauge CLA 2012-05-15 10:08:01 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. 

Diagram Editor won't run when installed via p2 Juno repo.

    Is there a work-around? If so, why do you believe the work-around is insufficient? 

Not using p2.

    How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

See comment 3.  Manual and automated have been run.

    Give a brief technical overview. Who has reviewed this fix? 

The changes involves moving to new API for similar graphiti services.

    What is the risk associated with this fix?

Medium risk, but change is required for full Juno support.
Comment 6 Carl Anderson CLA 2012-05-15 10:31:30 EDT
We had build problems the last time we moved up Graphiti levels.  Let me know if there is anything I can do to help.
Comment 7 Neil Hauge CLA 2012-05-15 13:59:36 EDT
Patch released.  Thanks guys.
Comment 8 Neil Hauge CLA 2012-05-15 17:40:34 EDT
Karen made a good point in that the Graphiti dependency version ranges also need to be updated to require a minimum of 0.9.  This is not required for the build, but will prevent problems in the field.

This shouldn't require another PMC approval...we just need to get it in by end of day Wednesday if possible. Petya, can you make these changes?
Comment 9 Tran Le CLA 2012-05-15 19:22:22 EDT
Carl, I updated the prereqs to Graphiti 0.9.0M7.201205091113 and I ran into the following build failure. I am sure that Graphiti gets pulled in since I have verified that the URL is correct. Concerning the org.eclipse.emf.validation.ocl, I don’t know if it is a new Graphiti requirement, and I was wondering if you saw this failure when you tried to update Graphiti?

[build-wtp4x-dali4x-sdk] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied.
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] Bundle org.eclipse.jpt.jpadiagrameditor.ui:
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.graphiti_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.graphiti.mm_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.graphiti.pattern_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.graphiti.ui_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] Bundle org.eclipse.emf.validation.ocl:
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.ocl_[1.3.0,4.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript] 	Missing required plug-in org.eclipse.ocl.ecore_[1.3.0,4.0.0).
[build-wtp4x-dali4x-sdk] 
[build-wtp4x-dali4x-sdk] BUILD FAILED
Comment 10 Petya Sabeva CLA 2012-05-16 08:07:35 EDT
(In reply to comment #8)
> Karen made a good point in that the Graphiti dependency version ranges also
> need to be updated to require a minimum of 0.9.  This is not required for the
> build, but will prevent problems in the field.
> 
> This shouldn't require another PMC approval...we just need to get it in by end
> of day Wednesday if possible. Petya, can you make these changes?

I've noticed that Tran already did this instead of me.
Comment 11 Neil Hauge CLA 2012-05-16 10:45:43 EDT
(In reply to comment #9)

From some quick investigation, I see that these messages have been in the previous passing builds (before move to graphiti 0.0):

[build-wtp4x-dali4x-sdk] [eclipse.buildScript] Bundle
org.eclipse.emf.validation.ocl:
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.ocl_[1.3.0,4.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.ocl.ecore_[1.3.0,4.0.0).

What is new are these messages:

[build-wtp4x-dali4x-sdk] [eclipse.buildScript] Bundle
org.eclipse.jpt.jpadiagrameditor.ui:
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.graphiti_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.graphiti.mm_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.graphiti.pattern_[0.9.0,1.0.0).
[build-wtp4x-dali4x-sdk] [eclipse.buildScript]     Missing required plug-in
org.eclipse.graphiti.ui_[0.9.0,1.0.0).


I'm not sure how important the order of the messages is, and why in some cases you could have missing required plug-ins and the build will pass and in other cases fail.  But in either case, it seems like we probably should have always had OCL (org.eclipse.ocl) as a Dali(WTP) build dependency as it is required by EMF Validation.  I'm not sure why this wasn't already in the build.  My guess is that there is something else wrong, but perhaps Graphiti is now using EMF Validation in a way that requires OCL, and we just need to add it?

Also, Petya, how are you compiling/running this in your workspace?  Do you have the OCL plugin installed?  Are you getting error messages in your log regarding this missing dependency at runtime?
Comment 12 Petya Sabeva CLA 2012-05-16 11:12:45 EDT
I downloaded the "Eclipse IDE for Java EE Developers" from here http://www.eclipse.org/downloads/index-developer.php and from the Juno updatesite, available in "Help -> Install New Software...", I installed all features from the Modeling group that contains "Graphiti" in their names.

I haven't installed OCL plugin, but everything works fine for me.
Comment 13 Neil Hauge CLA 2012-05-16 11:46:36 EDT
OK...so with a little more research, it appears that the only dependency on EMF Validation is coming from o.e.emf.transaction, which specifically depends on o.e.emf.validation bundle.  There does not appear to be any need for o.e.emf.validation.ui or o.e.emf.validation.ocl in our build.  It would be nice if we could leave out emf.validation.ui and emf.validation.ocl from the build, as these don't appear to be required by anything and at the very least are causing build messages that could be avoided.  So I think the OCL issue is a red herring.
Comment 14 Carl Anderson CLA 2012-05-16 12:00:43 EDT
I am not entirely sure that graphiti is getting properly installed in the compilation environment.  I don't see any errors, but I don't think it is getting installed properly.  Let me try the same thing I had to do for 0.8.0
Comment 15 Neil Hauge CLA 2012-05-16 12:15:51 EDT
(In reply to comment #14)
> I am not entirely sure that graphiti is getting properly installed in the
> compilation environment.  I don't see any errors, but I don't think it is
> getting installed properly.  Let me try the same thing I had to do for 0.8.0

Sounds good.  I am thinking the same thing.  Looking into differences from 0.8 to 0.9.
Comment 16 Neil Hauge CLA 2012-05-16 12:20:22 EDT
Carl, this may be an ignorant comment, but could the problem be that all of the required bundles in the 0.9 release are pack.gz?  I would assume the build could handle that, but it is one major difference between 0.8 and 0.9.  There are no standard jars in 0.9 site for the required bundles.
Comment 17 Carl Anderson CLA 2012-05-16 12:25:08 EDT
(In reply to comment #13)
> OK...so with a little more research, it appears that the only dependency on EMF
> Validation is coming from o.e.emf.transaction, which specifically depends on
> o.e.emf.validation bundle.  There does not appear to be any need for
> o.e.emf.validation.ui or o.e.emf.validation.ocl in our build.  It would be nice
> if we could leave out emf.validation.ui and emf.validation.ocl from the build,
> as these don't appear to be required by anything and at the very least are
> causing build messages that could be avoided.  So I think the OCL issue is a
> red herring.

Actually, in thinking about it, this is most likely the issue that keeps us from using a p2 repo install of all of these prereqs.  Can you please open a bug against releng with this info, and then nag me until I look into it?  (Which probably won't be until after Juno, but is an issue we should deal with.)

Using the p2 repo install of org.eclipse.emf.validation, we should be able to be selective about what we pull in, and avoid this missing prereq.  But I would hate to mess up the builds trying this during the release candidates.
Comment 18 Neil Hauge CLA 2012-05-16 12:33:03 EDT
Was there some sort of hack in place that was making 0.8 work that we can use to get 0.9 working?  Sounds like you were alluding to this in comment 14.  I assume you are still trying this out to see if it will work?
Comment 19 Carl Anderson CLA 2012-05-16 13:37:09 EDT
(In reply to comment #18)
> Was there some sort of hack in place that was making 0.8 work that we can use
> to get 0.9 working?  Sounds like you were alluding to this in comment 14.  I
> assume you are still trying this out to see if it will work?

Yes, and it is what you alluded to in comment 16.  graphiti only ships a repository, and certain plugins therein are only in pack200 format.  Since we can't get emf transaction to install via p2 (as I mentioned in comment 17), the workaround for Indigo was to repackage the final graphiti release as if it were a downloadable zip instead of a pack200 repository.  Unfortunately, due to lack of sleep, I have done a less than perfect job of it the two times I have tried so far... let's hope that the third time is a charm!

I just kicked off another build, with a tweaked version of graphiti 0.9 in the prereqCache.
Comment 20 Neil Hauge CLA 2012-05-17 11:18:50 EDT
Seems we are compiling now.  Carl, should we leave this bug open until tests are working or go ahead and mark as resolved?
Comment 21 Petya Sabeva CLA 2012-05-17 11:38:27 EDT
I was able to open the JPA diagram with the latest build for the WTP smoke test. Nevertheless I noticed that this is possible only if I install the Graphiti plugins through the "Eclipse Install Manager", pointing to a local update site. With the previous builds it was enough if I copied the Graphiti plugins and features to the respective unzipped eclipse's folders.
Comment 22 Neil Hauge CLA 2012-05-17 11:46:31 EDT
(In reply to comment #21)

I think this is because Graphiti 0.9 uses pack200 files and as a result Eclipse wouldn't be able to read the the contents.  The files are converted to jars in the p2 installation process.
Comment 23 Neil Hauge CLA 2012-05-22 12:24:45 EDT
Carl,

Perhaps we should temporarily yank the Diagram Editor tests from the WTP build so we can get the full test suite running again?  Anyone else have thoughts on this?

The diagram editor code is pretty static, so I don't think there is a lot of risk in doing this temporarily.
Comment 24 Neil Hauge CLA 2012-05-22 12:41:54 EDT
And also, it looks like we should move EMF Validation and EMF Transaction up to 1.6 Juno versions as well for Graphiti 0.9.
Comment 25 Carl Anderson CLA 2012-05-22 12:49:28 EDT
(In reply to comment #23)
> Carl,
> 
> Perhaps we should temporarily yank the Diagram Editor tests from the WTP build
> so we can get the full test suite running again?  Anyone else have thoughts on
> this?
> 
> The diagram editor code is pretty static, so I don't think there is a lot of
> risk in doing this temporarily.

We may need to use this solution for WTP 3.4.0.  Both the tests and the prereqs
for the tests would have to be removed.  (It is the install of the prereqs that
is failing.)  I am working on changing the way that the build does p2 installs,
but that may be too big of a change to contain this late in WTP 3.4.0.  Please
keep me informed of what files you are changing to remove the prereqs and the
tests, so that I can revert them for my work.  And let me know if you need help
disabling the Diagram Editor tests or the prereqs for it.
Comment 26 Neil Hauge CLA 2012-05-22 12:55:44 EDT
(In reply to comment #25)

OK.  Petya, Kaloyan:  Are you guys OK with this solution for 3.4.0?  The tests would need to be run locally to ensure that there aren't any issues, but they wouldn't be run as a part of the main build.  Let me know and we can take care of the changes necessary to make this happen.
Comment 27 Petya Sabeva CLA 2012-05-23 09:41:34 EDT
(In reply to comment #26)
> OK.  Petya, Kaloyan:  Are you guys OK with this solution for 3.4.0?  The tests
> would need to be run locally to ensure that there aren't any issues, but they
> wouldn't be run as a part of the main build.  Let me know and we can take care
> of the changes necessary to make this happen.

I am OK with this solution. Even, I've already executed the tests and all passed successfully.
Comment 28 Neil Hauge CLA 2012-05-23 10:16:50 EDT
We'll get started with the changes.
Comment 29 Tran Le CLA 2012-05-24 02:03:51 EDT
Created attachment 216174 [details]
p2Director install log file

I have removed the jpadiagrameditor tests (it is not listed anymore in the tests compile log) and the sdk build is passing successfully.
However the tests build is failing. P2 could not found graphity when it is installing the jpadiagrameditor_sdk.feature. I started building without graphity since it not required for the tests, but even when I added it back it is still failing. There's something strange going on when P2 is trying to install the tests.

http://build.eclipse.org/webtools/committers/wtp4x-R3.4.0-I/20120524031152/I-3.4.0-20120524031152/
Comment 30 Tran Le CLA 2012-05-29 23:40:58 EDT
I have completely removed the diagram editor so the tests build will not attempt to load graphiti anymore, and it started to run again. The problem is definitely caused by loading the graphiti dependency into the tests build.
Comment 31 Tran Le CLA 2012-05-30 17:30:06 EDT
Resolving this bug for now since RC2 has been declared.
I have opened the bug 381111 to follow-up on the graphiti installation problem.