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

Bug 315869

Summary: Support marking a plan "transitively complete" (disabling auto-provisioning)
Product: [RT] Virgo Reporter: Peter Gardfjäll <peter.gardfjall.work>
Component: unknownAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: charles.vuijst, glyn.normington
Version: unspecifiedFlags: glyn.normington: documentation+
Target Milestone: 3.5.0.M01   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Peter Gardfjäll CLA 2010-06-05 04:07:17 EDT
Build Identifier: virgo-kernel-2.1.0.BUILD-20100511170138

Related to the startup/deployment performance issue (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=315865), a nice feature would be to allow a plan to be marked "transitively complete". That would signal to Virgo that the plan is "self-sufficient" in the sense that it contains all the bundles it needs to satisfy its own dependencies. This would allow the plan deployer to by-pass the resolution/auto-provisioning step, which can be quite expensive performance-wise. In case all plan bundles cannot be resolved, Virgo would signal deployment failure rather than trying to auto-provision the missing transitive dependencies.

See the following forum thread for background and discussion:
  http://forum.springsource.org/showthread.php?t=86495&highlight=launcher.bundles

Reproducible: Always
Comment 1 Glyn Normington CLA 2011-10-10 10:41:01 EDT
Another user has hit problems with the provisioning of transitive dependencies taking several minutes.

A workaround which they used was to specify bundles in the baseBundles property in the user region configuration file. These bundles are deployed without any transitive dependency provisioning. However, this approach is limiting because exact version numbers are specified which makes it hard to update bundles to provide patches/fixes.
Comment 2 Glyn Normington CLA 2011-11-29 08:52:04 EST
I am proposing to add an optional "dependencies" attribute to plan definitions.

It will by default have a value of "install" which means Virgo will calculate missing dependencies (in a "side-state", prior to installing in the OSGi framework) and install them from the repository chain. This process can involve multiple iterations and therefore multiple runs of the OSGi resolver, which can be a time-consuming process.

To be able to avoid this overhead, plans will also support a value of "noinstall" in which case Virgo will skip the calculation of missing dependencies and will install the plan contents directly in the OSGi framework after which resolution will either succeed or fail. If resolution fails, then diagnostics will be issued and the plan will be uninstalled as usual.
Comment 3 Glyn Normington CLA 2011-12-01 05:56:03 EST
A better proposal has been found after discussion with a colleague.

A new optional "provisioning" attribute is added to plan definitions.

This specifies whether Virgo installs bundles from the repository to attempt to satisfy any missing dependencies in the plan. Missing dependencies prevent one or more bundles in the plan from resolving. For example, a bundle which imports a package cannot resolve if the package is missing, that is, not exported by another bundle.

A value of auto instructs Virgo to install bundles from the repository to attempt to satisfy any missing dependencies in the plan. This is known as auto-provisioning.

A value of disabled prevents Virgo from installing bundles from the repository to attempt to satisfy any missing	dependencies in the plan. This value can make the plan deploy faster, although if there are missing dependencies, deployment will fail.

A value of inherit, which is the default if no value is specified, inherits the parent plan's provisioning behaviour. If the plan does not have a parent, it inherits Virgo's auto-provisioning behaviour.


This is described in documentation commits 10b078da374d823b8c0e41d95f7671a1e0e5f60a and 798d3520f582691521aa0e13655d08eac91d873f.
Comment 4 Glyn Normington CLA 2011-12-02 09:17:14 EST
Implemented in kernel commits 66d87f9a80e9df7d888fb48b88dd8e5f2eea5b69 through 114a6c03ede7b4b1a8fca536ea078836cd0df209.
Comment 5 Glyn Normington CLA 2011-12-06 04:43:59 EST
Note that it is possible to use provisioning="disabled" as a poor man's solution to bug 326770 as this prevents all dependencies, including optional dependencies, from being faulted in. This would not be a particularly elegant solution since it would be necessary to transitively complete such a plan to add any mandatory dependencies.

A more elegant solution to bug 326770 could be to support an additional option such as provisioning="mandatory" which would lie between auto and disabled and would only auto-provision bundles to satisfy mandatory dependencies (and would ignore optional dependencies from an auto-provisioning perspective).