| Summary: | allow a repository to be put into offline mode | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Mik Kersten <mik.kersten> |
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P1 | CC: | robert.elves, wmitsuda |
| Version: | unspecified | ||
| Target Milestone: | 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Mik Kersten
He he. I thought you didn't want that feature. :-) I don't want the whole UI to go into an offline mode when casually moving from a connected to a disconnected state, because it puts a manual mode switch burden on the user. But I'm OK with a single repository to be put in offline mode. It opens up potential for confusion if you forget to re-enable it, but is needed for your use case and others, e.g. if someone goes on a 2 week vacation they may not always want to be synching to their work repository for that time. I know. But if you'll do that, then it makes sense to allow to specify how often each repository should be synchronized too... :-) *** Bug 181386 has been marked as a duplicate of this bug. *** BTW, I wonder if background sync should be running on queries/categories that don't match currently selected task working sets... I think that they should be. So that when you quickly switch working sets to see if anything new came in you have accurate incoming information, modulo the delay from the synch interval. Maybe, but on the other hand, synchronizing those "uninteresting" tasks takes time, and they can be only made interesting one day a week, so may not worth to synch them every 10 or 20 minutes like tasks that are "interesting". We only synchronize changed tasks. So the only cost should be running the query for changed tasks. Then there is additional overhead if a task changes multiple times in the week, since it will be synchronized during each change, but that should be small. Unless there is concrete evidence that our current synchronization policy is a problem I don't think we should offload any work from the network at the expense of the user not having the information there instantly when they need it. The load on repositories might still be significant though (bug 187323). In fact for JIRA it is currently severely high since we download all tasks that have changed since the last synchronization. Yup, connector implementation can definitely trigger traffic problems (e.g. always downloading task data). But unless there is indication that those can't be solved on the connector end I think we should stick with our current lazy synchronization policy. Does this task require any API changes that we need to get done before Friday? Seems like it can be done without API changes. Steffen: I can't get to us until I'm done with fixing externalizers, so if you're willing to take a stab at it that would be great. I think that all that needs to happen is to store a boolean isOffline() on TaskRepository and then exclude it from any synch. In the Task Repositories view its icon should just become disabled or overlayed with something weird (I'll fix later) and then we need an action for toggline the online/offline state. I'll look into it after I have resolved bug 193430. Created attachment 71846 [details]
add offline mode
Patch does the following:
* Adds an item to the repository context menu to toggle offline mode
* Decorates the repository icon with a grey globe when offline
* Skips repository in ScheduledSynchronizationJob when offline
Created attachment 71847 [details]
mylar/context/zip
Created attachment 71848 [details]
overlay icon (org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gif)
Patch applied and looking good. Great stuff Steffen. Rob: we should verify that tasks that are opened from a repo that's offline don't get the warning icon... Created attachment 71965 [details]
do not report status when offline
Follow up patch that does not set show the warning icon when repository is in offline mode and task is synchronized in background (when the editor is opened).
Please review and apply.
Another thing I noticed is that the repository list is not saved when the offline status is toggled resulting in lost state if Eclipse crashes.
Created attachment 71966 [details]
mylyn/context/zip
Rob: please review and apply Created attachment 71969 [details]
updated patch that persists offline setting when changed
Patch applied. Thanks. Mik, the 2.0 plan needs an update now :). Done, with pleasure :) |