Bug 212811 - [ui] The sizing phase should not return a size when some artifacts are missing
Summary: [ui] The sizing phase should not return a size when some artifacts are missing
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 222135
  Show dependency tree
 
Reported: 2007-12-12 16:13 EST by Pascal Rapicault CLA
Modified: 2009-03-30 14:46 EDT (History)
1 user (show)

See Also:


Attachments
Missing Sizes/Artifact detection during Sizing (2.88 KB, patch)
2009-02-05 14:46 EST, Matthew Piggott CLA
susan: iplog+
Details | Diff
Test cases (31.99 KB, patch)
2009-02-05 14:46 EST, Matthew Piggott CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2007-12-12 16:13:29 EST
Currently the sizing phase will return an incorrect size if some artifacts are not available. This could be misleading if the user decided to make his decision of installation based on the size, but worth it would fail during the installation.

I think that the sizing phase should indicate when an artifact can not be found.
Comment 1 Pascal Rapicault CLA 2008-05-12 22:04:36 EDT
These kinds of situations will unlikely happen and are caught properly. Moving to 3.5.
Comment 2 Matthew Piggott CLA 2009-02-05 14:46:17 EST
Created attachment 124858 [details]
Missing Sizes/Artifact detection during Sizing

With this change, the Sizing phase will now return an IStatus.ERROR if an artifact cannot be located in an ArtifactRepository, and will return an IStatus.WARNING if the repository does not specify an artifact's size.

There are two codes associated with the Warning status, Sizing.INCOMPLETE_DISK_SIZE, and Sizing.INCOMPLETE_DOWNLOAD_SIZE
Comment 3 Matthew Piggott CLA 2009-02-05 14:46:42 EST
Created attachment 124859 [details]
Test cases
Comment 4 Pascal Rapicault CLA 2009-02-05 15:05:36 EST
Susan could you please review, release and make use of this? Thx.
Comment 5 Susan McCourt CLA 2009-02-05 18:15:41 EST
marking M6, probably next week before i get to this.
What Matt describes sounds good, but I need to give a little thought to how we report the missing artifact case (and also note we may not always report it if the user has already closed the wizard before the sizing could complete...we would just get the same error we get now).
Comment 6 Susan McCourt CLA 2009-03-30 14:46:10 EDT
Fixed in HEAD >20090330.
Note that there is no change (yet) on the UI side, that is bug 222135.

When Matt and I first discussed how to go about this, I suggested that he use an OR'ed constant to report missing download size/disk size or both in a WARNING status.  At the time I suggested this I didn't think about the fact that status codes aren't really set up to be OR'able.  Also didn't like the constant values (1 and 2), which could possibly collide with other status constants.  I ended up adding a single constant to ProvisionException to go with the other missing artifact constants and using this to report an incomplete size.  It loses the ability to distinguish between missing disk size and missing download size, but I didn't like the alternatives.

Other changes/corrections I made in the patch:
- the NLS message used for the ERROR and WARNING statuses was the same (and used the word error in the string).  Made two separate messages for the two cases.
- the NLS message was being bound to a class name (?) and there was no variable in the string, I assume it was a copy/paste thing.  Removed this code.
- the phase id was being used in the status instead of the plug-in id.  Fixed this.
- there was no status code set in the ERROR status.  I used the MISSING ARTIFACT code from ProvisionException since it was there.