Issue Details (XML | Word | Printable)

Key: HUDSON-5536
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: kohsuke
Reporter: abayer
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hudson

DownloadService as of 1.344 does not work with existing tool and update center JSON files

Created: 07/Feb/10 09:29 PM   Updated: 08/Feb/10 01:59 PM   Resolved: 08/Feb/10 11:30 AM
Return to search
Component/s: core
Affects Version/s: None
Fix Version/s: None

Issue Links:
Dependency
 
Duplicate
 


 Description  « Hide

The change for HUDSON-5210 breaks all use of the existing downloadService.post instances for all the tools and the update center itself. See http://hudson.pastebin.com/m22c14ec. I'm not sure what to do to fix it.



abayer added a comment - 07/Feb/10 09:35 PM

FYI - as a workaround, redownload the JSON files (http://hudson-ci.org/updates/hudson.tasks.Maven.MavenInstaller.json and the other tools, or http://hudson-ci.org/update-center.json), and remove everything but the actual {} JSON object. Save the file(s) (removing the .json file extension for the tools, though not for update-center.json) and you should be able to function.


abayer made changes - 08/Feb/10 08:44 AM
Field Original Value New Value
Description The change for HUDSON-5120 breaks all use of the existing downloadService.post instances for all the tools and the update center itself. See http://hudson.pastebin.com/m22c14ec. I'm not sure what to do to fix it. The change for HUDSON-5210 breaks all use of the existing downloadService.post instances for all the tools and the update center itself. See http://hudson.pastebin.com/m22c14ec. I'm not sure what to do to fix it.
mindless added a comment - 08/Feb/10 09:55 AM

I added an onException handler in downloadService.post and found it was getting an exception in nslXMLHttpRequest.setRequestHeader (with mac firefox 3.5).. seems the requestHeaders parameter to Ajax.Request is required.. adding requestHeaders:[] seems to resolve the problem.


mindless made changes - 08/Feb/10 10:10 AM
Assignee mindless [ mindless ]
mindless made changes - 08/Feb/10 10:10 AM
Status Open [ 1 ] In Progress [ 3 ]
mindless added a comment - 08/Feb/10 10:33 AM

I'll commit a little fix to avoid js error in firefox after successful update.. kohsuke will commit main fix for the issue (crumb object adds bad header with empty value). This will resolve both update of update center data, and refresh of plugin/hudson upgrade status on the /updateCenter/ page.


mindless made changes - 08/Feb/10 10:33 AM
Assignee mindless [ mindless ] kohsuke [ kohsuke ]
mindless added a comment - 08/Feb/10 10:34 AM

(the requestHeaders:[] workaround above was just a bandaid for that particular case to overwrite the bad/empty header added elsewhere)


kohsuke added a comment - 08/Feb/10 11:15 AM

The root cause was in our modification to Ajax.Request, so this pretty much affects all AJAX activities in Hudson.


kohsuke made changes - 08/Feb/10 11:16 AM
Link This issue is duplicated by HUDSON-5537 [ HUDSON-5537 ]
kohsuke made changes - 08/Feb/10 11:17 AM
Link This issue is duplicated by HUDSON-5540 [ HUDSON-5540 ]
kohsuke made changes - 08/Feb/10 11:18 AM
Link This issue is duplicated by HUDSON-5546 [ HUDSON-5546 ]
aheritier added a comment - 08/Feb/10 11:26 AM

ok, I downgrade because I fixed files this morning and probably the update center automatically updated them and broke them again


scm_issue_link added a comment - 08/Feb/10 11:30 AM

Code changed in hudson
User: : kohsuke
Path:
branches/rc/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
branches/rc/test/src/test/java/hudson/model/DownloadServiceTest.java
branches/rc/test/src/test/resources/hudson/model/DownloadServiceTest/testPost.jelly
branches/rc/war/resources/scripts/hudson-behavior.js
trunk/www/changelog.html
http://hudson-ci.org/commit/27147
Log:
[FIXED HUDSON-5536] in 1.345 and added a test case.


scm_issue_link made changes - 08/Feb/10 11:30 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
scm_issue_link added a comment - 08/Feb/10 11:39 AM

Code changed in hudson
User: : mindless
Path:
trunk/hudson/main/core/src/main/java/hudson/model/DownloadService.java
trunk/hudson/main/core/src/main/java/hudson/model/UpdateSite.java
http://hudson-ci.org/commit/27145
Log:
HUDSON-5536 set text/plain content type in doPostBack response so browser won't
try to parse response (resulting in "no element found" in firefox error console).
Not the fix for 5536 itself, but nice to avoid js error after successful update.


abayer made changes - 08/Feb/10 01:59 PM
Link This issue is blocking HUDSON-5546 [ HUDSON-5546 ]