Bug 499182 - Hudson Connector cannot retrieve build information if Jenkins does not provide changeset tag
Summary: Hudson Connector cannot retrieve build information if Jenkins does not provid...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 1.12   Edit
Hardware: PC Windows 10
: P2 major (vote)
Target Milestone: 1.13   Edit
Assignee: Jason Thompson CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2016-08-04 16:24 EDT by Jason Thompson CLA
Modified: 2016-08-11 19:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Thompson CLA 2016-08-04 16:24:09 EDT
If the build information retrieved from Hudson/Jenkins does not contain a changeset element, the retrieval process will throw a NullPointerException.

Stack Trace:

java.lang.NullPointerException
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.parseChangeSet(HudsonServerBehaviour.java:541)
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.parseBuild(HudsonServerBehaviour.java:309)
	at org.eclipse.mylyn.internal.hudson.core.HudsonServerBehaviour.getBuilds(HudsonServerBehaviour.java:142)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession$1.run(RefreshSession.java:109)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession$1.run(RefreshSession.java:1)
	at org.eclipse.mylyn.builds.internal.core.util.BuildRunner.run(BuildRunner.java:72)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession.refreshBuilds(RefreshSession.java:106)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshSession.refresh(RefreshSession.java:100)
	at org.eclipse.mylyn.builds.internal.core.operations.RefreshOperation$RefreshJob.doExecute(RefreshOperation.java:75)
	at org.eclipse.mylyn.builds.internal.core.operations.BuildJob.run(BuildJob.java:79)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

According to the XSD, a build with no changeset tag is legal:

<xsd:complexType name="hudson.model.AbstractBuild">
<xsd:complexContent>
<xsd:extension base="hudson.model.Run">
<xsd:sequence>
<xsd:element name="builtOn" type="xsd:string" minOccurs="0"/>
<xsd:element name="changeSet" type="hudson.scm.ChangeLogSet" minOccurs="0"/>
<xsd:element name="culprit" type="hudson.model.User" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="fingerprint" type="hudson.model.Fingerprint" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Comment 1 Jaxsun McCarthy Huggan CLA 2016-08-04 16:55:57 EDT
Thank you for the report. Can you let us know what version of Jenkins you are using? We have had this reported previously, but it was for an as of yet unsupported Jenkins version (see Bug 489334).

We are planning on updating our supported versions soon, see Bug 498893.
Comment 2 Jason Thompson CLA 2016-08-05 12:56:09 EDT
Ah... Yes, I'm using 1.652. That being said, fixing this would not break anything on 1.651.1 and it's rendering the plugin useless for me in the meantime.

Go ahead and assign this bug to me and I'll fix this issue.
Comment 3 Eclipse Genie CLA 2016-08-06 10:49:31 EDT
New Gerrit change created: https://git.eclipse.org/r/78576
Comment 5 Sam Davis CLA 2016-08-11 19:40:49 EDT
Thanks very much for the contribution!