Bug 323920 - [build][hudson] config retrieval fails for jobs with whitespaces
Summary: [build][hudson] config retrieval fails for jobs with whitespaces
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: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-08-29 16:55 EDT by Benjamin Muskalla CLA
Modified: 2011-01-05 14:44 EST (History)
1 user (show)

See Also:


Attachments
patch (2.18 KB, patch)
2010-08-29 17:23 EDT, Benjamin Muskalla CLA
no flags Details | Diff
hudson config (4.71 KB, application/octet-stream)
2010-08-30 15:59 EDT, Steffen Pingel CLA
no flags Details
patch v2 (4.68 KB, patch)
2010-08-30 17:50 EDT, Benjamin Muskalla CLA
steffen.pingel: iplog+
Details | Diff

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:55:37 EDT
Add repository with jobs that contain whitespaces (eg. http://swinglabs.org/hudson/ ). Refresh fails with the following exceptions:

!SUBENTRY 1 org.eclipse.mylyn.hudson.core 4 0 2010-08-29 22:53:17.368
!MESSAGE Unexpected error: Invalid uri 'http://swinglabs.org/hudson//job/Databinding Continuous Build/config.xml': escaped absolute path not valid
!STACK 0
java.lang.IllegalArgumentException: Invalid uri 'http://swinglabs.org/hudson//job/Databinding Continuous Build/config.xml': escaped absolute path not valid
	at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:222)
	at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
	at org.eclipse.mylyn.internal.commons.http.CommonGetMethod.<init>(CommonGetMethod.java:49)
	at org.eclipse.mylyn.commons.http.HttpOperation.createGetMethod(HttpOperation.java:41)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$4.execute(RestfulHudsonClient.java:226)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient$4.execute(RestfulHudsonClient.java:1)
	at org.eclipse.mylyn.internal.hudson.core.client.HudsonOperation.run(HudsonOperation.java:32)
	at org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient.getJobConfig(RestfulHudsonClient.java:242)
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.getPlans(HudsonServerBehaviour.java:158)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession$4.run(RefreshSession.java:142)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession.refreshPlans(RefreshSession.java:134)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession.refresh(RefreshSession.java:69)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshOperation$RefreshJob.doExecute(RefreshOperation.java:48)
	at org.eclipse.mylyn.builds.internal.core.operations.BuildJob.run(BuildJob.java:79)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Benjamin Muskalla CLA 2010-08-29 17:23:07 EDT
Created attachment 177695 [details]
patch

This should do the trick. Maybe you could add another job with a whitespace on the test server, then this scenario should be covered by HudsonClientTest
Comment 2 Steffen Pingel CLA 2010-08-30 14:40:39 EDT
Thanks for the patch! I have added a new job called "test-white space" to http://mylyn.eclipse.org/hudson/view/Test/. Could you include a test case for that in the patch?
Comment 3 Benjamin Muskalla CLA 2010-08-30 15:07:12 EDT
I'd love to but running the tests always fails due to a connection timeout. Also browsing the test instance takes minutes(!) to load a page here from Germany. Any idea how to accelerate the response times of the test hudson instance? Will try to setup a minimal local hudson for running the tests
Comment 4 Steffen Pingel CLA 2010-08-30 15:59:23 EDT
Created attachment 177772 [details]
hudson config
Comment 5 Steffen Pingel CLA 2010-08-30 15:59:43 EDT
That's not good. Sometimes the server is pretty slow for me, too. I'll see if I can do anything about it but we might be stuck with this for now. I have attached the config files for the test jobs.
Comment 6 Benjamin Muskalla CLA 2010-08-30 17:50:20 EDT
Created attachment 177793 [details]
patch v2

Added testcase, in order to run the tests properly, add a nullcheck in RestfulHudsonClient#setConfiguration until bug 324039 is fixed
Comment 7 Steffen Pingel CLA 2010-08-31 00:18:51 EDT
Thanks! Patch applied.