Skip to content

Commit 926e67c

Browse files
authored
Do not create AggregatorRunner if the corresponding section is missing (#561)
1 parent c06cfdc commit 926e67c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Framework/src/InfrastructureGenerator.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ vector<OutputSpec> InfrastructureGenerator::generateCheckRunners(framework::Work
476476
void InfrastructureGenerator::generateAggregator(WorkflowSpec& workflow, std::string configurationSource, vector<framework::OutputSpec>& checkRunnerOutputs)
477477
{
478478
// TODO consider whether we should recompute checkRunnerOutputs instead of receiving it all baked.
479+
auto config = ConfigurationFactory::getConfiguration(configurationSource);
480+
if (config->getRecursive("qc").count("aggregators") == 0) {
481+
ILOG(Warning, Devel) << "No \"aggregators\" structure found in the config file. If no postprocessing is expected, then it is completely fine." << ENDM;
482+
return;
483+
}
479484
DataProcessorSpec spec = AggregatorRunnerFactory::create(checkRunnerOutputs, configurationSource);
480485
workflow.emplace_back(spec);
481486
}

Framework/test/testInfrastructureGenerator.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ BOOST_AUTO_TEST_CASE(qc_factory_empty_config)
214214
{
215215
WorkflowSpec workflow;
216216
BOOST_REQUIRE_NO_THROW(InfrastructureGenerator::generateStandaloneInfrastructure(workflow, configFilePath));
217-
BOOST_CHECK_EQUAL(workflow.size(), 1);
217+
BOOST_CHECK_EQUAL(workflow.size(), 0);
218218
}
219219
{
220220
WorkflowSpec workflow;

0 commit comments

Comments
 (0)