Scenario: Updating Eclipse Install Using The Update Manager

Last Updated: Saturday, March 01, 2003

Objectives:

The objective of these scenarios is to illustrate the Eclipse update manager function through simple end-to-end use cases. The scenarios are divided into two parts.

Part 1: Updating Eclipse - "One Click" Update

Setup:

Available sites:
*** PLEASE READ *** PLEASE READ *** PLEASE READ *** PLEASE READ ***
As part of this scenario you will be downloading and installing various versions of the Eclipse components into the running Eclipse. The update site is populated with features that have their version numbers modified as part of the build process. They are generally of the form 2.0.0.QUALIFIER, where the qualifier differs build to build. Note, however, that when you install base Eclipse (.zip downloaded from eclipse.org), all of its features and plug-ins only use 3 part version identifiers (generally 2.1.0). So all the 2.1.0.Q updates in fact appear more recent that the build you are running, even though they may in fact be an older build. Note, that when you update the Eclipse components from the update site and restart you may in fact now be running DIFFERENT CODE THAN WHAT YOU STARTED WITH. So it is really important that you start each of the test scenario steps with a clean install of eclipse. It is suggested that you always use a second install of Eclipse running with a different workspace (than what you use to do development) to actually run through these scenarios.

When opening Bugzilla defects, use the Platform/Update component. Please ALWAYS specify the failing scenario step, and include a .zip of the <workspace>/.metadata/ directory

Steps:

A. Startup new Eclipse

B. Save baseline configuration

C. "One Click" update

D. Restoring Original Configuration

Part 2: Alphabet Soup

Setup:

Available sites: The above site contains pre-built features used as part of the following scenario steps. It also includes several .zip files (containing features and plug-ins) that are used to simulate native installer steps.
 
*** PLEASE READ *** PLEASE READ *** PLEASE READ *** PLEASE READ ***
When opening Bugzilla defects, use the Platform/Update component. Please ALWAYS specify the failing scenario step, and include a .zip of the <workspace>/.metadata/ directory

Description:

The Alphabet Soup is a simple application packaged as an Eclipse product, plus several extensions. The application installs a tool button, and a menu ("Alphabet Soup") that can be used to query the content of the "soup bowl" and interact with the individual installed "letters" (each letter in the bowl corresponds to a separate plug-in) Just follow the steps and you'll get the idea.

Steps:

O. Completing the install

P. Updating the primary feature using update manager

Q. Updating the primary feature using "native" install (.zip)

R. Adding an extension using the update manager

S. Adding an extension using "native" install (.zip) and link file

T. Installing another extension using the update manager (with environment filtering)

"Free-form" testing

Part 3: Optional features and e-fixes

Setup:

Available sites:

The above site contains pre-built features used as part of the following scenario steps.
 

*** PLEASE READ *** PLEASE READ *** PLEASE READ *** PLEASE READ ***

When opening Bugzilla defects, use the Platform/Update component. Please ALWAYS specify the failing scenario step, and include a .zip of the <workspace>/.metadata/ directory. Note that we ran out of letters, so we are starting from A again. You need to include the part number when specifying steps (e.g. 3.A7)

Description:

The Optional Site is a simple site that contains several versions of the 'Root' feature. The feature includes another feature (XYZBogus) that in turn includes features XYZ and Bogus. The last two features are included as optional, which means that users can elect not to install them. Several interesting consequences result from this capability, and this part deals with them.

The site also contains several e-fixes. E-fix is a feature that is designed to patch another feature with an exact ID and version. It is used to deliver temporary fixes between full root updates.

A. Installing feature Root 1.0.0

A1. Open Update Manager. Create a bookmark with the URL listed above.
A2. Expand the new node and select feature Root 1.0.0. Press 'Install' button in the Preview view.
A3. Accept the license in the License page.
A4. Uncheck 'XYZ 1.0.0' optional feature in the Optional Features page. Leave 'Bogus 1.0.0' feature selected.
A5. Install (accept unsigned feature). Restart.
A6. Verify that 'Root 1.0.0' feature has been installed and that 'XYZ 1.0.0' is missing.
A7. Toggle the view button so that disabled features are visible. Verify that 'XYZ 1.0.0' is shown and marked as '(not installed')
A8. If you want to stop being warned about unsigned features, toggle the option off in the Install/Update preferences. Verify that you are warned about the consequences (rogue features deleting your entire hard drive and such).

B. Updating Root 1.0.0 to Root 1.0.1

B1. Open Update Manager. Expand 'Optional site' bookmark created in scenario A and select 'Root 1.0.1'. Verify that Preview view shows 'Update' button. Press it.
B2. After accepting the license, verify that features 'XYZBogus' and 'Bogus' are checked  and grayed out in 'Optional Features' page, while 'XYZ' plug-ins is unchecked (leave it unchecked). Install and restart.
B3. Verify that we now have Root 1.0.1 installed that is still without XYZ feature (XYZ 1.0.1 shows as 'not installed' when disabled features are shown in the view).

C. Preserving the state of the optional feature

C1. Close Eclipse. Manually delete all 'com.example.*' features from the features/ directory and all 'com.example.*' plug-ins from the plugins/ directory. Delete the '.config' directory in the .metadata directory of the workspace (you want to preserve the bookmark).
C2. Repeat scenario A but this time leave all the optional features selected.
C3. Restart and open current configuration. Verify that all the features are showing as enabled.
C4. Select 'XYZ 1.0.0' feature and select 'Disable' button in the preview. Restart.
C5. Verify that 'XYZ 1.0.0' feature is now disabled in the 'Root 1.0.0' hierarchy (you will need to make disabled features visible in the view to do that).
C6. Move to the Updates view and find Root 1.0.1 feature in 'Optional Site' bookmark. Click on 'Update' button.
C7. After accepting the license, leave all settings default and install the new version. Restart.
C8. Verify that 'Root 1.0.1' is now installed, and that 'XYZBogus 1.0.1' and 'Bogus 1.0.1' are showing in the hierarchy. Also verify that 'XYZ 1.0.1' is installed but disabled (we are testing whether the original state of XYZ 1.0.0 was preserved during the update). The expected outcome is that the new version of XYZ is installed but it remains disabled as before.

D1. Installing the missing optional feature (from the originating site)

D1.1. Repeat cleanup as in C1.
D1.2. Repeat the scenario A.
D1.3. After the restart, go back to the Updates view and select Root 1.0.0 again. Verify that the action button is visible and that the label is "Change". Press it.
D1.4. When in 'Optional Features' wizard page, ensure that 'Bogus 1.0.0' optional feature is checked and grayed out. Select 'XYZ 1.0.0' feature. Finish the install. Restart.
D1.5. Verify that we now have all the features in 'Root 1.0.0' hierarchy in the current configuration.

D2. Installing the missing optional feature (using the saved originating site URL)

D2.1. After finishing D1., delete XYZ 1.0.0 feature and XYZ 1.0.0 plug-in manually from features and plugins directories, respectively.
D2.2. After restart, open Update Manager and toggle 'Show Disabled Features' button on the 'Configuration' view. Select 'XYZ 1.0.0' feature object (should be shown as 'not installed').
D2.3. Verify that the 'Install' button is shown in the Details view. Press it.
D2.4. When the install wizard shows up, follow it until XYZ 1.0.0 plug-in is installed. Cool: missing optional feature reference has a preserved URL of the originating site that it can use to reconnect and install it later.

E. Discovering missing optional feature

E1. Manually copy 'com.example.xyz_1.0.0' from 'features' directory and 'com.example.xyz_1.0.0' from 'plugins' directory into a temp. place. After that, repeat cleanup as in C1.
E2. Repeat the scenario A and verify that XYZ 1.0.0 is missing from the configuration (shown as 'not installed').
E3. Close Eclipse. Manually copy 'com.example.xyz_1.0.0' feature from the temp. space into the 'features' directory and 'com.example.xyz_1.0.0' plug-in from the temp. space into the 'plugins' directory. Start Eclipse.
E4. Verify that no dialog was shown and that feature XYZ 1.0.0 was detected and configured into the hierarchy of 'Root 1.0.0'.

F. Installing missing optional features natively after updates

F1. Repeat preservation + cleanup as in E1.
F2. Repeat the scenario A.
F3. Run the 'one-click' update (Help->Software Updates->New Updates). The wizard should discover feature 'Root 1.0.1'. Accept the license and finish install. Restart.
F4. At this point, we should have installed Root 1.0.1 with XYZBogus 1.0.1 and Bogus 1.0.1, but not XYZ 1.0.1 (not installed because we didn't have XYZ 1.0.0 and one-click update should only update installed software).
F5. Manually copy feature XYZ 1.0.0 from the temp space and plug-in XYZ 1.0.0 from the temp space as in E3.
F6. At this point, verify that XYZ 1.0.0 is present in the hierarchy of XYZ 1.0.0 but disabled because Root 1.0.0 is disabled.
F7. Run the 'one-click' update again as in F3. It should discover XYZ 1.0.1 again because we now have previous version of XYZ and it can now bring it up to 1.0.1
F8. Verify in the configuration that XYZ 1.0.1 is now installed and enabled.

Note: as you go through the the scenarios G, H and I that deal with e-fixes, it is recommended to increase the coverage by switching between multiple workspaces (install couple of e-fixes, then start with a new workspace, install some more, create a new workspace, install some more, than switch back to the first one). Since state is stored in each workspace, that will give Update an additional workout to reconcile its state with changes in the file system (both partial and full reconcilers will kick in).

G1. Cumulative patches

G1.1 Repeat steps C1, C2 and C3 to install Root 1.0.0 feature hierarchy. Verify that all Root features (including optional ones) are installed.
G1.2 Expand optional site bookmark in Updates and locate folder "Emergency Fixes". Locate feature EFIX e334 1.0.0. Select it and install it.
G1.3 After restart, verify that EFIX e334 has been installed and that it includes XYZ 1.0.0.e334. The same XYZ feature should be included by Root 1.0.0->XYZ Bogus 1.0.0 (should show up arrow indicating branch update). There should be no errors or warnings.
G1.4 Expand optional site bookmark in Updates and locate folder "Emergency Fixes". Locate feature EFIX e335 1.0.0. Select it and install it. Note: e335 is a cumulative fix because it fixes a problem in XYZ 1.0.0 and also includes a fix in e334.
G1.5 After restart, verify that e335 has been installed and that it includes XYZ 1.0.0.e335. The same XYZ feature should be included by Root 1.0.0->XYZ Bogus 1.0.0 (should show up arrow indicating branch update). 
G1.6 The same XYZ 1.0.0.e335 should also show up as a child of EFIX e334. The interpretation is that XYZ 1.0.0.e335 also includes a fix for e334, so the fact that the previous version has been disabled does not invalidate EFIX e334.

G2. Patches that include other patches

G2.1. Repeat steps C1, C2 and C3 to install Root 1.0.0 feature hierarchy. Verify that all Root features (including optional ones) are installed.
G2.2. Expand optional site bookmark in Updates and locate folder 'Emergency Fixes'. Locate feature EFIX e452 1.0.0. Select it and install it.
G2.3. After restart, verify that: EFIX e452 is installed; its child feature e388 should include Bogus Feature 1.0.0.e388. The same Bogus Feature should be included by Root 1.0.0 hierarchy. There should be no errors or warnings.
G2.4. Expand 'Saved Configurations' folder. Verify that a backup configuration for e452 has been created (backup configurations have label in format "@<id_version>  backup".

H. Updating feature branches with partial patch cleanup

H1. After installing patch e452 in scenario G2, search for new updates by selecting 'Window->Updates->New Updates'.
H2. When the update wizard comes up with the results, uncheck the checkbox 'Filter features included ...'. Uncheck "Root 1.0.1" and check "XYZBogus 1.0.1" from the list of search results. Cool: this demonstrates how branches in the feature hierarchy can be individually updated.
H3. Accept the license agreement and install the feature.
H4. After restart, verify that Root 1.0.0 now includes XYZBogus 1.0.1 (Cool: XYZBogus 1.0.1 image should have an upward pointing arrow overlay indicating that the feature has been updated from the original version specified in the Root 1.0.0 manifest). Also verify that e388 does not show up anywhere, but EFIX e452 should still be present in the configuration.

Note: Technically, since EFIX e452 includes EFIX e388 and since e388 is now disabled because XYZBogus 1.0.1 is updated, EFIX e452 should show error status (missing included feature). Update performs additional computation in this case to find if e452 is really broken. The fact is that even though the referenced feature e388 is disabled, it is a patch for XYZBogus 1.0.0 which has since been upgraded. Updates makes a (daring) assumption that a formal update for a feature includes all the patches published for a previous version of that feature. In this particular case, Update assumes that XYZBogus 1.0.1, being an update to XYZBogus 1.0.0, contains all the fixes registered for XYZBogus 1.0.0, including e388. It concludes that EFIX e452 will indirectly satisfy its need for e388 through XYZBogus 1.0.1 code.

I. Updating feature root with patch cleanup

I1. After updating XYZBogus in scenario H, search for updates again. This time, accept the default (Root 1.0.1) and install it.
I2. After restart, verify that Root 1.0.1 is installed and that all the included features are version 1.0.1. Also verify that there are no e-fixes left enabled in the configuration.
I3. Open file ".install-log" in <workspace>/.metadata/.config/ and verify that it contains logs of all the activities performed in scenarios G, H and I.

J. Handling cross-site version conflicts

The role of this scenario is to show how cross-site conflicts are handled. Cross-site conflicts are caused by root features in separate install sites that include features of the same ID but different versions. Since both features will be configured and their plug-ins contributed to the Eclipse runtime, runtime will resolve the duplication by selecting plug-ins with the higher version. Update warns about this 'silent' upgrade when an attempt is made to install or update a feature that can cause such a conflict to appear.

J1. Repeat cleanup as in C1.
J2. Select "Optional Site" bookmark as in A1 and install Root 1.0.0 with all the optional features. Restart.
J3. Add another bookmark called "Extension Site" with the URL as shown above.
J4. Expand the bookmark object and select feature "Root Extension 1.0.0". Press "Install" button.
J5. Accept the license and select both the optional features for install.
J6. Do not accept the default target install site. Instead, create a new one by pressing "Add" button. Choose a location outside the Eclipse product tree (anywhere else on the disk). Press "Finish". Restart.
J7. Verify that the current configuration has two install sites. The first one should contain Eclipse features and Root 1.0.0. The second one (the one you picked in J6) should contain Root Product Extension 1.0.0. There should be no conflicts.
J8. Search for new updates by selecting "Window->Updates->New Updates". You should get two results: Root 1.0.1 and Root Extension 1.0.1. Uncheck Root 1.0.1. Press "Next" and accept all other default settings until "Finish" is enabled. Press Finish".
J9. Verify that a warning dialog is opened explaining the conflict. The conflict should be caused by XYZ and Bogus features that will be 1.0.0 in one site and 1.0.1 in another if the update proceeds. Answer "No".
J10. Return back to the first page of the wizard and select both results (Root 1.0.1 and Root Extension 1.0.1). Advance to the last page and press "Finish" again. This time, there should be no conflicts because both XYZ and Bogus features will be simultaneously updated to version 1.0.1.
J11. After restart, verify that the current configuration shows no warning overlays.

I. Web-triggered updates

Update Manager has a neat feature whereby it can run a Web application and accept calls from a browser with the right URL. Tasks like presentation, search, classification, user verification etc. can all be handled by the provider's web site (presumably running a Web application itself). Features and plug-ins are still in the standard update sites, but these sites are used as feature servers. When users click on 'Download' or similar buttons or links, a URL query is composed and sent to Eclipse with the Update Web application running. Update servlet receives the query and initiates the install process. At this point, we are in the familiar install wizard.

I1. Repeat the cleanup as in C1.
I2. Open "Preferences" dialog and select "Install/Update->Web-triggered updates" page. Turn the web application on. When pressing "OK" there will be a couple of seconds delay (starting the Tomcat server).
I3. Open Update Manager and create a new site bookmark using the URL listed above. When in the wizard, choose the non-default 'Web site' bookmark type. Finish.
I4. Double-click on the bookmark to cause the External Preview view to open (note: this is only on Windows; on other platform, the page will open in a standalone Web browser).
I5. You should see a page with two Download buttons. Press on the Download button for Root 1.0.0. Verify that a progress monitor dialog opens while connecting to the feature server. Eventually, Install Wizard should show up. Follow it to install Root 1.0.0.
I6. After restart, double-click on the Web link again and click on the 'Download' button for Root 1.0.0. This time, a problem response page should show up indicating that the requested feature is already installed.
I7. Click on the 'Download' button for the feature Root 1.0.1. This one should be treated as an update. Follow it to the end and restart.
I8. Verify that the configuration shows the correct features.