Bug 274841 - [repository] canceling a repository load keeps keeps (just added) repository
Summary: [repository] canceling a repository load keeps keeps (just added) repository
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2009-05-04 10:59 EDT by Henrik Lindberg CLA
Modified: 2020-02-20 04:19 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindberg CLA 2009-05-04 10:59:38 EDT
I don't know if this is an issue, but I thought it was worth discussing from an API standpoint.

If a RepositoryManager.load(...) is canceled, it will keep the repository. In other circumstances if there is an error, it will remove the repository.

This is caused because it performs cleanup on a provision exception, but not on a OperationCanceled exception. My initial reaction was that it should perform the same cleanup.
Comment 1 Susan McCourt CLA 2009-05-04 11:27:14 EDT
I'm not sure this is what we want.  
The user might indirectly cancel a repository load for any number of reasons.
- didn't mean to perform the action
- got tired of waiting
- pressed the wrong button in the wizard
- cancelled out of a wizard where a load job was underway

None of these means the repo is bad and should be removed from the manager.


Comment 2 Henrik Lindberg CLA 2009-05-04 12:14:27 EDT
(In reply to comment #1)
> I'm not sure this is what we want.  
> The user might indirectly cancel a repository load for any number of reasons.
> - didn't mean to perform the action
> - got tired of waiting
> - pressed the wrong button in the wizard
> - cancelled out of a wizard where a load job was underway
> 
> None of these means the repo is bad and should be removed from the manager.
> 
Not adding it would only apply when just adding the repository. Compare to when a timeout occurs - in this case the repository would not be added. To me these cases are similar - they both manifest an indeterminate state (you don't know if the site is there or not).
Comment 3 John Arthorne CLA 2009-05-04 17:58:46 EDT
Definitely something to clarify in the API either way.

Just to clarify, the repository manager never removes repositories in loadRepository, but it can decide not to add a repository on failure. I don't think this issue comes up in the end user UI because the user will always add the repository before a load occurs. This more likely comes up in headless scenarios where a client immediately calls load without first adding the repository.
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:32:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 5 Ed Merks CLA 2020-02-20 04:19:44 EST
I assume the current state/behavior is acceptable as is.