Bug 267887 - [ui] No Repository Found dialog's details is the same as the error
Summary: [ui] No Repository Found dialog's details is the same as the error
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on: 248604 271681
Blocks:
  Show dependency tree
 
Reported: 2009-03-10 11:49 EDT by Matthew Piggott CLA
Modified: 2009-04-21 14:58 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot of Error Dialog (30.41 KB, image/jpeg)
2009-03-10 11:49 EDT, Matthew Piggott CLA
no flags Details
Patch for surfacing errors (5.63 KB, patch)
2009-04-16 11:40 EDT, Matthew Piggott CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Piggott CLA 2009-03-10 11:49:24 EDT
Created attachment 128218 [details]
Screenshot of Error Dialog

Our Internet connection dropped when I opened the 'Install New Software' dialog, after a little while I was presented with an error dialog with a list of problems (No repository found at ...) and the option to press Details for more information.  The information displayed in Details area appears to be exactly the same as the text in the Problems.
Comment 1 Susan McCourt CLA 2009-03-10 11:56:16 EDT
The intention is to report the specific problem found for each repo.  It's possible we didn't have any more detail.  Need to check and if there is no detail, maybe say something like "No more detailed information was available."
Comment 2 John Arthorne CLA 2009-03-11 12:56:12 EDT
Note in bug 248604 Henrik is working on providing meaningful error messages for the cause of connection failures. We can use this bug to track making sure these messages surface in the right place in the UI.
Comment 3 Susan McCourt CLA 2009-04-15 19:39:42 EDT
This depends on the outcome of 271681.
For each ProvisionException repo error code thrown, we need to decide:

- the appropriate error message for the user
- whether the error should be reported each time or remembered/swallowed.  Currently the UI remembers "not found" repos and doesn't report them again, similarly to what the repo manager does, but I'm not sure we want to swallow something like a "failed read"
- in some cases we may want to report the error by offering the user some options such as deleting the site or allowing them to enter a different URL.  Often the problem is a typo and as soon as the site is not found, the user could correct the typo.  But I'll need to understand the difference between codes like REPOSITORY_NOT_FOUND and REPOSITORY_INVALID_LOCATION...
Comment 4 Matthew Piggott CLA 2009-04-16 11:40:06 EDT
Created attachment 132098 [details]
Patch for surfacing errors

The patch handles: REPOSITORY_FAILED_READ, REPOSITORY_FAILED_AUTHENTICATION, and REPOSITORY_INVALID_LOCATION in the same manner as REPOSITORY_NOT_FOUND.

I noticed something which may be of interest for duplicated error messages: if a MultiStatus is created with the Error status as a child, then the text of the MulitStatus is shown in the dialog and the details are the child.

The message from the MulitStatus is still duplicated in the Details along with the child, but it may be interesting to display a generic error message first.
Comment 5 Susan McCourt CLA 2009-04-20 18:53:37 EDT
I think the "duplicate details" is a feature of error dialog.  It will list each status in the multi status in the top, and depending on how much detail there is for each child status, there may or may not be more to report at the bottom.

Bug 248604 and bug 271681 focus on surfacing more detailed errors in the exceptions and rolling these up into the statuses.

On the UI side, I've released some changes in this area, but I'm not marking this bug as fixed yet.  It needs more testing.

I didn't use the patch because there were some problems with it:
- the changes weren't in the right place (QueryableRepositoryManager is where we accumulate the problem status info for all the repos, not the MetadataRepositoryElement)
- we don't want to always use ProvUI.reportNotFound for all error codes because this will suppress future errors reported on the repo.  If the problem is something like credentials, we want to surface that error each time, not give up on the repo for the current session
- MetadataRepositoryElement is more of a "last chance" error reporting mechanism.  
Comment 6 Susan McCourt CLA 2009-04-21 14:58:25 EDT
marking fixed >20090421.

I cleaned this up some more as part of working on bug 269507.
The new rule of thumb is that any UI code that tries to load a repo should funnel exceptions through ProvUI.handleNotFound(...).

That code will check the individual status codes and decide how to surface the error, whether the error should be remembered, whether any corrections or alternate actions are offered, etc.  This way, we don't have a bunch of different client code making different decisions.

The only place in the UI that intentionally handles load failures differently is QueryableRepositoryManager.  The issue here is that there are some code paths where we are loading every single repository.  In this case, we don't want to barrage the user with individual errors.  This class handles the accumulation of statuses for each failed repository and reporting them as one group of failures.