Issue Type: Bug Bug
Assignee: rsandell
Attachments: 0001-json-reading-for-ExternalResourceTreeNode.patch, metadata.json
Components: external-resource-dispatcher
Created: 10/Apr/13 7:48 AM
Description:

Occurs in jenkins v 1.510 (and the older one too) with external-resource-dispatcher v1.0b

Steps to reproduce:
1. Start with fresh jenkins with resources plugin
2. Create node "NodeT": launch method = launch slave agents via web start
3. Add metadata to node
4. add External Resource TreeNode "TreeNodeName" to the node metadata
5. add Resource to TreeNode: "ResourceName", id=7417, enabled
6. save node
7. start node via webstart
8. download node metadata (output attached):
$ jenkins-cli -s http://localhost:8080 get-metadata -node NodeT > metadata.json
9. (optionally modify something in metadata.json)
10. try to upload metadata:
$ jenkins-cli -s http://localhost:8080 update-metadata -replace -node NodeT < metadata.json

Expected result:
Metadata should be updated (replaced)

Actual result
Exception is thrown:
$ jenkins-cli -s http://localhost:8080 update-metadata -replace -node NodeT < metadata.json
Failed to authenticate with your SSH keys. Proceeding with anonymous access
java.lang.IllegalArgumentException: The child value is null
at com.sonyericsson.hudson.plugins.metadata.model.values.ParentUtil.replaceChild(ParentUtil.java:63)
at com.sonyericsson.hudson.plugins.metadata.model.values.ParentUtil.replaceChildren(ParentUtil.java:100)
at com.sonyericsson.hudson.plugins.metadata.cli.UpdateMetadataCommand.run(UpdateMetadataCommand.java:129)
at hudson.cli.CLICommand.main(CLICommand.java:229)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
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 hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

Cause of error and FIX:
ExternalResourceTreeNode.ExternalResourceTreeNodeDescriptor.fromJson(..) is not implemented (always returns null).
Attached patch adds implementation. it's based on similar function for ExternalResource.

Project: Jenkins
Priority: Major Major
Reporter: Mateusz Lewicki
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to