rombert / ereviewboard

A mylyn-based Eclipse integration for Review Board
46 stars 31 forks source link

Error when getting info on repository that's down #118

Open jacobweber opened 11 years ago

jacobweber commented 11 years ago

Using eReviewBoard 0.13.2, I'm connecting to a ReviewBoard 1.6.11 server with multiple repositories. One of the repositories is down (so the RB server can't connect to it).

In the Task List view, I select New Query, and try to create a ReviewBoard query. But I get the error below. From watching the network traffic, it looks like it's trying to request info for the repository that's down:

http://my-reviewboard-URL/api/repositories/1/info/

If I try to hit that myself, I get a 404:

HTTP/1.1 404 NOT FOUND Date: Mon, 11 Feb 2013 19:19:45 GMT Server: Apache/2.2.22 (Ubuntu) Content-Length: 70 Content-Language: en-us Expires: Mon, 11 Feb 2013 19:19:45 GMT Vary: Accept,Cookie,Accept-Language Last-Modified: Mon, 11 Feb 2013 19:19:45 GMT Cache-Control: max-age=0 Content-Type: application/vnd.reviewboard.org.error+json

{"stat": "fail", "err": {"msg": "Object does not exist", "code": 100}}

A similar thing happens when I try to create a new ReviewBoard request from a project.

Is it possible to fix this so that if it can't get info on a certain repository, it can skip it and move on?

Here's the error:

Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.review_board.ereviewboard.ui.ReviewboardUiUtil.refreshRepositoryData(ReviewboardUiUtil.java:104) at org.review_board.ereviewboard.ui.wizard.ReviewboardQueryPage.updateRepositoryData(ReviewboardQueryPage.java:162) at org.review_board.ereviewboard.ui.wizard.ReviewboardQueryPage.createControl(ReviewboardQueryPage.java:410) at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174) at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736) at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1182) at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1241) at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1238) at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1227) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1225) at org.eclipse.mylyn.internal.tasks.ui.wizards.SelectRepositoryPage$5.open(SelectRepositoryPage.java:254) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction.run(NewQueryAction.java:92) at org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction.run(NewQueryAction.java:55) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) Caused by: java.lang.reflect.InvocationTargetException at org.review_board.ereviewboard.ui.ReviewboardUiUtil$1.run(ReviewboardUiUtil.java:94) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.review_board.ereviewboard.core.exception.ReviewboardApiException: There was an error fetching extended information for this repository at org.review_board.ereviewboard.core.client.RestfulReviewboardReader.checkedGetJSonRootObject(RestfulReviewboardReader.java:111) at org.review_board.ereviewboard.core.client.RestfulReviewboardReader.readRepositoryInfo(RestfulReviewboardReader.java:294) at org.review_board.ereviewboard.core.client.RestfulReviewboardClient.loadRepositoryInfo(RestfulReviewboardClient.java:247) at org.review_board.ereviewboard.core.client.RestfulReviewboardClient.updateRepositoryData(RestfulReviewboardClient.java:437) at org.review_board.ereviewboard.ui.ReviewboardUiUtil$1.run(ReviewboardUiUtil.java:92) ... 1 more

rombert commented 11 years ago

Can you add the listing of http://my-reviewboard-URL/api/repositories/ ( sensitive information removed ) ?

jacobweber commented 11 years ago

Unfortunately I already deleted the misbehaving repository. It was a SVN repository pointing to a remote server, but that server was no longer reachable from the ReviewBoard machine.

rombert commented 11 years ago

Then let me know if this happens again, and I'll try to get to the root cause.

dattahs commented 11 years ago

I hit this issue recently.. here is the output of http://my-reviewboard-URL/api/repositories/ with my org replaced with a dummy org name. I am running behind a proxy and initially I suspected unqualified SVN repository names (inside my org) in this result trying to go via proxy. But even after I added these unqualified names to my proxy bypass list, issue remains the same. The exception is exactly what is stated in first update.

`<?xml version="1.0" encoding="utf-8"?>

394 ok httpx://view.svn.sourceforge.net/svnroot/view/ Subversion 7 https://reviewboard.myorg.com/api/repositories/7/info/ GET https://reviewboard.myorg.com/api/repositories/7/ GET https://reviewboard.myorg.com/api/repositories/7/ PUT https://reviewboard.myorg.com/api/repositories/7/ DELETE libview http://qls-svn/repositories/vs-o Subversion 15 https://reviewboard.myorg.com/api/repositories/15/info/ GET https://reviewboard.myorg.com/api/repositories/15/ GET https://reviewboard.myorg.com/api/repositories/15/ PUT https://reviewboard.myorg.com/api/repositories/15/ DELETE qls-svn http://build-svn.myorg.com/svn/dummy Subversion 16 https://reviewboard.myorg.com/api/repositories/16/info/ GET https://reviewboard.myorg.com/api/repositories/16/ GET https://reviewboard.myorg.com/api/repositories/16/ PUT https://reviewboard.myorg.com/api/repositories/16/ DELETE DUMMY http://qls-svn/repositories/o11n Subversion 27 https://reviewboard.myorg.com/api/repositories/27/info/ GET https://reviewboard.myorg.com/api/repositories/27/ GET https://reviewboard.myorg.com/api/repositories/27/ PUT https://reviewboard.myorg.com/api/repositories/27/ DELETE qls-svn-o11n http://tlv-svn.myorg.com/repository Subversion 29 https://reviewboard.myorg.com/api/repositories/29/info/ GET https://reviewboard.myorg.com/api/repositories/29/ GET https://reviewboard.myorg.com/api/repositories/29/ PUT https://reviewboard.myorg.com/api/repositories/29/ DELETE dummy svn http://qls-svn/repositories/o11n2 Subversion 30 https://reviewboard.myorg.com/api/repositories/30/info/ GET https://reviewboard.myorg.com/api/repositories/30/ GET https://reviewboard.myorg.com/api/repositories/30/ PUT https://reviewboard.myorg.com/api/repositories/30/ DELETE qls-svn-o11n2 http://qls-svn/repositories/projects Subversion 42 https://reviewboard.myorg.com/api/repositories/42/info/ GET https://reviewboard.myorg.com/api/repositories/42/ GET https://reviewboard.myorg.com/api/repositories/42/ PUT https://reviewboard.myorg.com/api/repositories/42/ DELETE qls-svn-projects http://build-svn.myorg.com/svn/adm Subversion 35 https://reviewboard.myorg.com/api/repositories/35/info/ GET https://reviewboard.myorg.com/api/repositories/35/ GET https://reviewboard.myorg.com/api/repositories/35/ PUT https://reviewboard.myorg.com/api/repositories/35/ DELETE tlv-svn1.myorg.com_18080_adm https://insydsvn02/svn/ISM-V9/V9.0 Subversion 36 https://reviewboard.myorg.com/api/repositories/36/info/ GET https://reviewboard.myorg.com/api/repositories/36/ GET https://reviewboard.myorg.com/api/repositories/36/ PUT https://reviewboard.myorg.com/api/repositories/36/ DELETE insydsvn02 (VSM 9.0) http://qls-svn/repositories/o11n-sdk Subversion 68 https://reviewboard.myorg.com/api/repositories/68/info/ GET https://reviewboard.myorg.com/api/repositories/68/ GET https://reviewboard.myorg.com/api/repositories/68/ PUT https://reviewboard.myorg.com/api/repositories/68/ DELETE qls-svn-o11n-sdk http://qls-svn/repositories/plugins Subversion 128 https://reviewboard.myorg.com/api/repositories/128/info/ GET https://reviewboard.myorg.com/api/repositories/128/ GET https://reviewboard.myorg.com/api/repositories/128/ PUT https://reviewboard.myorg.com/api/repositories/128/ DELETE qls-svn-plugins http://build-svn.myorg.com/svn/itfm Subversion 274 https://reviewboard.myorg.com/api/repositories/274/info/ GET https://reviewboard.myorg.com/api/repositories/274/ GET https://reviewboard.myorg.com/api/repositories/274/ PUT https://reviewboard.myorg.com/api/repositories/274/ DELETE build_svn_itfm perforce-viper.myorg.com:1917 Perforce 24 https://reviewboard.myorg.com/api/repositories/24/info/ GET https://reviewboard.myorg.com/api/repositories/24/ GET https://reviewboard.myorg.com/api/repositories/24/ PUT https://reviewboard.myorg.com/api/repositories/24/ DELETE perforce-viper:1917 - ESX one-off hotfix branch server perforce-moose.myorg.com:40010 Perforce 270 https://reviewboard.myorg.com/api/repositories/270/info/ GET https://reviewboard.myorg.com/api/repositories/270/ GET https://reviewboard.myorg.com/api/repositories/270/ PUT https://reviewboard.myorg.com/api/repositories/270/ DELETE perforce-moose:4001 git://git.springsource.com/napa/napa.git Git 66 https://reviewboard.myorg.com/api/repositories/66/info/ GET https://reviewboard.myorg.com/api/repositories/66/ GET https://reviewboard.myorg.com/api/repositories/66/ PUT https://reviewboard.myorg.com/api/repositories/66/ DELETE springsource napa git@git.myorg.com:/asg_vblob_northbound.git Git 387 https://reviewboard.myorg.com/api/repositories/387/info/ GET https://reviewboard.myorg.com/api/repositories/387/ GET https://reviewboard.myorg.com/api/repositories/387/ PUT https://reviewboard.myorg.com/api/repositories/387/ DELETE asg_vblob_northbound git@git.myorg.com:/asg_vblob_southbound.git Git 388 https://reviewboard.myorg.com/api/repositories/388/info/ GET https://reviewboard.myorg.com/api/repositories/388/ GET https://reviewboard.myorg.com/api/repositories/388/ PUT https://reviewboard.myorg.com/api/repositories/388/ DELETE asg_vblob_southbound git://scm-git.myorg.com/nobel.git Git 43 https://reviewboard.myorg.com/api/repositories/43/info/ GET https://reviewboard.myorg.com/api/repositories/43/ GET https://reviewboard.myorg.com/api/repositories/43/ PUT https://reviewboard.myorg.com/api/repositories/43/ DELETE nobel git@git.myorg.com:/vos.git Git 44 https://reviewboard.myorg.com/api/repositories/44/info/ GET https://reviewboard.myorg.com/api/repositories/44/ GET https://reviewboard.myorg.com/api/repositories/44/ PUT https://reviewboard.myorg.com/api/repositories/44/ DELETE VOS git@git.myorg.com:/sfcb.git Git 45 https://reviewboard.myorg.com/api/repositories/45/info/ GET https://reviewboard.myorg.com/api/repositories/45/ GET https://reviewboard.myorg.com/api/repositories/45/ PUT https://reviewboard.myorg.com/api/repositories/45/ DELETE VOS SFCB git@git.myorg.com:/glib.git Git 46 https://reviewboard.myorg.com/api/repositories/46/info/ GET https://reviewboard.myorg.com/api/repositories/46/ GET https://reviewboard.myorg.com/api/repositories/46/ PUT https://reviewboard.myorg.com/api/repositories/46/ DELETE VOS GLIB git@git.myorg.com:/openwsman.git Git 47 https://reviewboard.myorg.com/api/repositories/47/info/ GET https://reviewboard.myorg.com/api/repositories/47/ GET https://reviewboard.myorg.com/api/repositories/47/ PUT https://reviewboard.myorg.com/api/repositories/47/ DELETE VOS OpenWsman git@git.myorg.com:/omc/base.git Git 48 https://reviewboard.myorg.com/api/repositories/48/info/ GET https://reviewboard.myorg.com/api/repositories/48/ GET https://reviewboard.myorg.com/api/repositories/48/ PUT https://reviewboard.myorg.com/api/repositories/48/ DELETE VOS OMC Base git@git.myorg.com:/cmpi.git Git 54 https://reviewboard.myorg.com/api/repositories/54/info/ GET https://reviewboard.myorg.com/api/repositories/54/ GET https://reviewboard.myorg.com/api/repositories/54/ PUT https://reviewboard.myorg.com/api/repositories/54/ DELETE VOS CMPI git@git.myorg.com:/omc/smash.git Git 49 https://reviewboard.myorg.com/api/repositories/49/info/ GET https://reviewboard.myorg.com/api/repositories/49/ GET https://reviewboard.myorg.com/api/repositories/49/ PUT https://reviewboard.myorg.com/api/repositories/49/ DELETE VOS OMC Smash https://reviewboard.myorg.com/api/repositories/ GET https://reviewboard.myorg.com/api/repositories/ POST https://reviewboard.myorg.com/api/repositories/?start=25&max-results=25 GET `
rombert commented 11 years ago

So which of the repositories is down? I think that this error is on the ReviewBoard side though, not in the plugin. If a repository is listed and when I try to access it it fails there's not much I can do about it.

I don't see an open bug in ReviewBoard (currently open API issues ) so I think it's worth raising one and linking it back here.

dattahs commented 11 years ago

I am a NooB to reviewboard internals, so at the risk of posing a dumb question, how about ignoring a repository that is down and proceeding with the rest. We might still be able to fetch review requests that are from repositories that are up.

rombert commented 11 years ago

If I do that there might be some problems down the road ... just to clarify, what exactly does "repository that's down" mean? Is it a repository which is added to RB but no longer responding to requests?

dattahs commented 10 years ago

Sorry for bringing this back up from dead after more than a year. But to answer your question, yes. A repository that is listed, but not responding. Right now it stops the working of plugin.

rombert commented 9 years ago

I can reproduce this myself by fiddling with the repository. I've asked a question on the reviewboard discussion group: [api] Behaviour of /api/repositories/{repository_id}/info when repository is no longer reachable, let's see what they say before thinking of if and how to fix this issue.