build.changeSet indicates changes, but (build.changeSet).logs is empty

384 views
Skip to first unread message

XRZ1138

unread,
Apr 19, 2011, 8:33:21 PM4/19/11
to Jenkins Developers, ch...@hp.com
Hello,

We use ${JELLY_SCRIPT, template="email"} in our configuration, but we
have a Project the email reports
of which state "No Changes" where there really were changes....the
detail view of the build on the
jenkins site shows them.

I checked the responsible Jelly code and I see:
====================================
<j:set var="changeSet" value="${build.changeSet}" />
<j:if test="${changeSet!=null}">
<j:set var="hadChanges" value="false" />
<TABLE width="100%">
<TR><TD class="bg1" colspan="2">CHANGES</TD></TR>
<j:forEach var="cs" items="${changeSet.logs}" varStatus="loop">
<j:set var="hadChanges" value="true" />
<j:set var="aUser" value="${cs.hudsonUser}"/>
<TR>
<TD colspan="2" class="bg2">${spc}Revision ${cs.revision} by
<j:choose>
<j:when test="${aUser!=null}">${aUser.displayName}: </
j:when>
<j:otherwise>${cs.user}: </j:otherwise>
</j:choose>
(${cs.msgAnnotated})
</TD>
</TR>
<j:forEach var="p" items="${cs.paths}">
<TR>
<TD width="10%">${spc}${p.editType.name}</TD>
<TD>${p.value}</TD>
</TR>
</j:forEach>
</j:forEach>
<j:if test="${!hadChanges}">
<TR><TD colspan="2">No Changes</TD></TR>
</j:if>
</TABLE>
<BR/>
</j:if>
====================================

Now, clearly changeSet == build.changeSet is not null or this section
of the report would not exist (i.e no "No Change" message)

...but because I am seeing the "no changes" message it seems that
changeSet.logs is empty because the
hadChanges variable is never set to true.

The polling log shows that it caught the one change that should have
been represented in the build report email:
===========================================
Started on Apr 19, 2011 12:01:16 PM
Looking for changes...
Using node: Jenkins
Using master perforce client: autoproc_Client-DEV
[Jenkins] $ "C:\Program Files\Perforce\p4.exe" workspace -o
autoproc_Client-DEV
Last sync'd change was 249604
[Jenkins] $ "C:\Program Files\Perforce\p4.exe" counter change
[Jenkins] $ "C:\Program Files\Perforce\p4.exe" -s changes //
autoproc_Client-DEV/...@249605,@249609
Latest submitted change selected by workspace is 249608
[Jenkins] $ "C:\Program Files\Perforce\p4.exe" describe -s 249608
Triggering a build.
Done. Took 1.9 sec
Changes found
===========================================

Has anyone else seen this?

Any pointers appreciated,

Chris


Christopher Hahn

unread,
Apr 21, 2011, 3:11:49 PM4/21/11
to Jenkins Developers
Hello,

I may have found my own answer....this appears to be a bug that
is going to be fixed in an upcoming release:

2.14 (upcoming)
• Improved the portability of the default Jelly templates across
different SCM implementations (whereas previously some of the
information was only displayed for Subversion)
• Send the "still unstable" email rather than the "unstable" email,
when the previous status was fail, and the status before that was
unstable. (issue #5411)

Take care,

Christopher

--
Realisant mon espoir, je me lance vers la gloire.
Christopher Hahn == xrz...@gmail.com

Kohsuke Kawaguchi

unread,
Apr 22, 2011, 12:12:53 AM4/22/11
to jenkin...@googlegroups.com, Christopher Hahn

Yeah, that's it.

I just posted a new release of the plugin.

On 04/21/2011 12:11 PM, Christopher Hahn wrote:
> Hello,
>
> I may have found my own answer....this appears to be a bug that
> is going to be fixed in an upcoming release:
>
> 2.14 (upcoming)

> � Improved the portability of the default Jelly templates across


> different SCM implementations (whereas previously some of the
> information was only displayed for Subversion)

> � Send the "still unstable" email rather than the "unstable" email,


--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/

Reply all
Reply to author
Forward
0 new messages