Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323919 - [build] Invalid repository not recognized
Summary: [build] Invalid repository not recognized
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 16:47 EDT by Benjamin Muskalla CLA
Modified: 2011-01-05 14:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-08-29 16:47:58 EDT
Just added "https://hudson.eclipse.org/" as new hudson repo (see the missing hudson path at the end). The UI tells me that this is a valid repository but in the logs, you'll find the following exceptions.


!ENTRY org.eclipse.mylyn.builds.core 4 2 2010-08-29 22:46:26.809
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.mylyn.builds.core".
!STACK 1
org.eclipse.core.runtime.CoreException: Unexpected error: Forbidden
	at org.eclipse.mylyn.internal.hudson.core.HudsonCorePlugin.toCoreException(HudsonCorePlugin.java:61)
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:296)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation$1.run(RefreshConfigurationOperation.java:77)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation.doRefresh(RefreshConfigurationOperation.java:75)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshConfigurationOperation.doExecute(RefreshConfigurationOperation.java:61)
	at org.eclipse.mylyn.builds.internal.core.operations.BuildJob.run(BuildJob.java:79)
	at org.eclipse.mylyn.builds.internal.core.BuildServer.refreshConfiguration(BuildServer.java:501)
	at org.eclipse.mylyn.builds.ui.spi.BuildServerPart$Validator.run(BuildServerPart.java:112)
	at org.eclipse.mylyn.commons.ui.team.RepositoryLocationPart$2.run(RepositoryLocationPart.java:579)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.mylyn.internal.hudson.core.client.HudsonException: Forbidden
	at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:34)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.getJobs(RestfulHudsonClient.java:205)
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.refreshConfiguration(HudsonServerBehaviour.java:294)
	... 9 more
Caused by: java.io.IOException: Forbidden
	at org.eclipse.mylyn.commons.http.CommonHttpClient.needsReauthentication(CommonHttpClient.java:103)
	at org.eclipse.mylyn.commons.http.HttpOperation.needsReauthentication(HttpOperation.java:102)
	at org.eclipse.mylyn.commons.http.HttpOperation.execute(HttpOperation.java:76)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$3.execute(RestfulHudsonClient.java:175)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$3.execute(RestfulHudsonClient.java:1)
	at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:32)
	... 11 more
Caused by: java.lang.UnsupportedOperationException
	at org.eclipse.mylyn.internal.commons.repositories.LocationService.requestCredentials(LocationService.java:93)
	at org.eclipse.mylyn.builds.internal.core.util.RepositoryWebLocation.requestCredentials(RepositoryWebLocation.java:53)
	at org.eclipse.mylyn.commons.http.CommonHttpClient.needsReauthentication(CommonHttpClient.java:97)
	... 16 more
Comment 1 Steffen Pingel CLA 2010-08-30 14:30:56 EDT
Yes, that needs to be improved. The validation only checks for a 200 response which is obviously not sufficient.
Comment 2 Benjamin Muskalla CLA 2010-08-30 17:26:28 EDT
Hudson always sends an X-Hudson header with it's version. We can check if the url is really a hudson instance and if we support this hudson version.

See http://wiki.hudson-ci.org/display/HUDSON/Remote+access+API
Comment 3 Steffen Pingel CLA 2010-08-30 17:56:09 EDT
Good idea. Let's do that.
Comment 4 Steffen Pingel CLA 2010-08-31 01:56:28 EDT
Fixed in head. The validator now looks for the header and has improved reporting.