View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007853CDashpublic2008-10-24 15:512008-10-29 18:32
ReporterTodd Harrington 
Assigned ToJulien Jomier 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.2 
Target VersionFixed in Version1.3 
Summary0007853: Builds sent from differnt sites can clobber each other
DescriptionThe function get_build_id() does not take enough parameters to uniquely identify a build. Last night we had two sites, running on the same OS, start nightly builds at the same time. Thus there build name (OS-compiler) and build stamp (date-time-type) were identical (we are migrating to a new server, but both are running at the moment).

To fix this problem I added the site name to get_build_id() and changed the DB query to:

  $sql = "SELECT build.id FROM build, site WHERE build.name='$buildname' AND build.stamp='$stamp' AND build.projectid='$projectid' AND build.siteid=site.id AND site.name='$sitename' ORDER BY id DESC";
  $build = pdo_query($sql);

Of course I also had to update all the places that called get_build_id() to include the site name in the call.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0013980)
Julien Jomier (manager)
2008-10-29 17:50

Fixed in svn. Thanks for the report and providing a fix.
(0013981)
Todd Harrington (reporter)
2008-10-29 18:24

I just looked at the changes you made, and the code is a bit wrong. Believe it or not, I made the exact same mistake on my first attempt to fix this issue.

  $site = $parser->index["SITE"];

Here $site is the XML site node. This is passed to the correctly update get_build_id() function. However, that function is expecting the site name which is:

  $sitename = $parser->vals[$site[0]]["attributes"]["NAME"];

For all but update submissions where it is:

  $sitename = getXMLValue($xmlarray,"SITE","UPDATE");

The site name is already computed near all the placed it is needed for calls to get_build_id(), so I just moved those to be before the call so I could use the value.
(0013982)
Julien Jomier (manager)
2008-10-29 18:32

Should be better now. Feel free to reopen if needed. Thanks again!

 Issue History
Date Modified Username Field Change
2008-10-24 15:51 Todd Harrington New Issue
2008-10-24 15:58 Julien Jomier Status new => assigned
2008-10-24 15:58 Julien Jomier Assigned To => Julien Jomier
2008-10-29 17:50 Julien Jomier Note Added: 0013980
2008-10-29 17:50 Julien Jomier Status assigned => closed
2008-10-29 17:50 Julien Jomier Resolution open => fixed
2008-10-29 17:50 Julien Jomier Fixed in Version => 1.3
2008-10-29 18:24 Todd Harrington Note Added: 0013981
2008-10-29 18:24 Todd Harrington Status closed => feedback
2008-10-29 18:24 Todd Harrington Resolution fixed => reopened
2008-10-29 18:32 Julien Jomier Note Added: 0013982
2008-10-29 18:32 Julien Jomier Status feedback => closed
2008-10-29 18:32 Julien Jomier Resolution reopened => fixed


Copyright © 2000 - 2018 MantisBT Team