getQueuedBuilds(): Handle dependent builds first
[?]
Jun 17, 2015, 12:46 PM
JAUB2FT5SNQWXR24TWTOHVT6UUJ6OQPAFPBZIQAQBHVWHWWFHLYACDependencies
- [2]
HHOMBU7Ghydra-queue-runner: Implement timeouts - [3]
NJJ7H64SVery basic multi-threaded queue runner - [4]
C6HOMHZWDon't try to handle SIGINT - [5]
24BMQDZAStart of single-process hydra-queue-runner - [6]
UQQ4IL55Add a error type for "unsupported system type" - [7]
2IQRXLWESupport cancelling builds - [8]
GKZN4UV7Make the queue monitor more robust, and better debug output - [9]
FQQRJUO4Mark builds as busy - [10]
YZAI5GQUImplement a database connection pool - [11]
N5O7VEEOImmediately abort builds that require an unsupported system type - [12]
ENXUSMSVMake concurrency more robust - [13]
IWB3F4Z6Fail builds with previously failed steps early - [14]
5AIYUMTBBasic remote building - [15]
22LDPAIPCheck non-runnable steps for unsupported system type
Change contents
- replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 482
std::list<Build::ptr> newBuilds; // FIXME: use queuestd::multimap<Path, Build::ptr> newBuilds; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 501
std::cerr << build->id << " " << build->buildTimeout << std::endl; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 502
newBuilds.push_back(build);newBuilds.emplace(std::make_pair(build->drvPath, build)); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 506
/* Now instantiate build steps for each new build. The builderthreads can start building the runnable build steps right away,even while we're still processing other new builds. */for (auto & build : newBuilds) {// FIXME: remove build from newBuilds to ensure quick destruction// FIXME: exception handlingstd::set<Step::ptr> newRunnable;unsigned int nrAdded;std::function<void(Build::ptr)> createBuild; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 510
createBuild = [&](Build::ptr build) { - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 512
nrAdded++; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 525
continue;return; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 528
std::set<Step::ptr> newSteps, newRunnable;std::set<Step::ptr> newSteps; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 530
/* Some of the new steps may be the top level of builds thatwe haven't processed yet. So do them now. This ensures thatif build A depends on build B with top-level step X, then Xwill be "accounted" to B in doBuildStep(). */for (auto & r : newSteps) {while (true) {auto i = newBuilds.find(r->drvPath);if (i == newBuilds.end()) break;Build::ptr b = i->second;newBuilds.erase(i);createBuild(b);}} - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 558
continue;return; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 606
if (badStep) continue;if (badStep) return; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 619
printMsg(lvlChatty, format("added build %1% (top-level step %2%, %3% new steps, %4% new runnable steps)")% build->id % step->drvPath % newSteps.size() % newRunnable.size());printMsg(lvlChatty, format("added build %1% (top-level step %2%, %3% new steps)")% build->id % step->drvPath % newSteps.size()); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 627
};/* Now instantiate build steps for each new build. The builderthreads can start building the runnable build steps right away,even while we're still processing other new builds. */while (!newBuilds.empty()) {auto build = newBuilds.begin()->second;newBuilds.erase(newBuilds.begin());newRunnable.clear();nrAdded = 0;createBuild(build); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 642
printMsg(lvlChatty, format("got %1% new runnable steps from %2% new builds") % newRunnable.size() % nrAdded); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1264
sleep(5);