[Cdash] No email on failed continuous builds
Trevor Kellaway
tkellaway at asl-vision.co.uk
Sat Jun 21 16:02:46 UTC 2008
Julien,
You may remember some time ago I was looking at why my continuous builds
weren't sending emails, and I didn't get anywhere. (Note Nightly email
notification works OK if I opt in for all emails, or just nightly
breakages).
I've had another look at this issue (Cdash 1.0), and have got a bit
further, it appears that the SELECT of the author list for the
updatefile is not returning any rows, however, if I manually do a mysql
query it is present.
Adding some logging code it appears as if it is a timing issue, that the
author buildid data is not present at the time of the sendemail query.
This seems bizarre as submit.php invokes ctestparser.php (which should
log the data) and finally sendemail.php.
I did a test changing sendemail.php to also query for a previous buildid
at the same time:
// Find the users
add_log("buildid='$buildid'","sendemail");
$tkauthors = mysql_query("SELECT author FROM updatefile WHERE
buildid='6874'");
$authors = mysql_query("SELECT author FROM updatefile WHERE
buildid='$buildid'");
add_log("tkauthors=".$tkauthors,"sendemail");
add_log("authors=".$authors,"sendemail");
add_log("rows=".mysql_num_rows($authors),"sendemail");
add_log("tkrows=".mysql_num_rows($tkauthors),"sendemail");
$tktmp = mysql_fetch_array($authors);
add_log("tktmp=".$tktmp,"sendemail");
while($authors_array = mysql_fetch_array($authors))
This produced the following log output:
[2008-06-21 16:09:18] (sendemail): Start buildid=6876
[2008-06-21 16:09:18] (sendemail): previousbuildid=6875
[2008-06-21 16:09:18] (sendemail): test=0=0
[2008-06-21 16:09:18] (sendemail): warning=0=0
[2008-06-21 16:09:18] (sendemail): error=0=4
[2008-06-21 16:09:18] (sendemail): fetching authors
[2008-06-21 16:09:18] (sendemail): buildid='6876'
[2008-06-21 16:09:18] (sendemail): tkauthors=Resource id #50
[2008-06-21 16:09:18] (sendemail): authors=Resource id #51
[2008-06-21 16:09:18] (sendemail): rows=0
[2008-06-21 16:09:18] (sendemail): tkrows=1
[2008-06-21 16:09:18] (sendemail): tktmp=
[2008-06-21 16:09:18] (sendemail): End buildid=6876
Note that the query for the hard coded ID is OK (tkrows=1), but the
current build query fails (rows=0).
And FYI, the following errors in the Apache error_log:
[Sat Jun 21 16:09:20 2008] [error] [client ...] PHP Notice: Undefined
index: value in .../CDash/ctestparser.php on line 78 [Sat Jun 21
16:09:20 2008] [error] [client ...] PHP Notice: Undefined index: value
in .../CDash/ctestparser.php on line 859
Something odd about this is the log times for ctestparser.php warning
are 2 seconds *after* the sendemail.php log messages. Is there some log
buffering going on, or is this really representative of the calling
order?
Hmm, a sudden thought, is submit.php invoked for each submitted XML file
in turn? If so maybe it is file order dependent?
This is the order the files were pushed in (by ctest 2.4):
Uploaded: .../Testing/20080621-1508/Build.xml
Uploaded: .../Testing/20080621-1508/Configure.xml
Uploaded: .../Testing/20080621-1508/Notes.xml
Uploaded: .../Testing/20080621-1508/Test.xml
Uploaded: .../Testing/20080621-1508/Update.xml
Any help gratefully received, as I could really do with getting this
issue resolved.
-Trevor
More information about the CDash
mailing list