fix(simple_metrics): warn when the pipelines doc is missing; document Mongo requirements (SIENTIAPDE-2191)
This commit is contained in:
@@ -551,7 +551,16 @@ class ModelMetrics(SientiaMonitoring):
|
||||
query = {'schedule_name': metadata['schedule_name']}
|
||||
try:
|
||||
pipeline = self.mongo_repository.find_one(self._PIPELINES_COLLECTION, query, metadata)
|
||||
if not pipeline or not pipeline.get('frequency_alert'):
|
||||
if not pipeline:
|
||||
# Likely misconfig: MONGODB_DATABASE_NAME differs from the orchestrator's, or the
|
||||
# schedule_name does not match its doc.
|
||||
self.warning(
|
||||
f'No pipelines doc for schedule {metadata["schedule_name"]}: '
|
||||
'adaptive state skipped',
|
||||
metadata,
|
||||
)
|
||||
return None
|
||||
if not pipeline.get('frequency_alert'):
|
||||
return None
|
||||
|
||||
runs = recovery_runs(input_data['interval_minutes'], pipeline['frequency_alert'])
|
||||
|
||||
Reference in New Issue
Block a user