From 71d256d192bbe8f1320c35f48be3b5c69efc32d1 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 18 Jul 2025 14:33:07 -0300 Subject: [PATCH 1/2] SIENTIAPDE-1151 Enhance OPC error handling by adding detailed notifications for missing servers during write operations. The notification includes the list of available OPC servers for better debugging. --- laborious/activities/opc.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/laborious/activities/opc.py b/laborious/activities/opc.py index c99a54d..23b2ac5 100644 --- a/laborious/activities/opc.py +++ b/laborious/activities/opc.py @@ -125,7 +125,15 @@ class OPC(BaseActivity): for server_id, config in opc_output_config.items(): if self.opc_repository.get(server_id) is None: - self.error(f"OPC server {server_id} not found", metadata) + message = f"OPC server {server_id} not found to perform write operation." + self.send_notification( + metadata=metadata, + notification_id="OPC_SERVER_NOT_FOUND", + message=message, + block="write_opc_data", + level=NotificationLevel.ERROR, + attachment_content=f"OPC servers: {list(self.opc_repository.keys())}" + ) continue if 'prediction_tags' in config: From 40cf93d500aee8b2d9dd2f90ca042c8ff6438659 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 18 Jul 2025 14:42:22 -0300 Subject: [PATCH 2/2] SIENTIAPDE-1151 Update GITHUB_BRANCH in values.yaml to reflect new stress testing branch and modify OPC error handling to set success flag instead of continuing on error. --- laborious/activities/opc.py | 2 +- values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/laborious/activities/opc.py b/laborious/activities/opc.py index 23b2ac5..4ee3092 100644 --- a/laborious/activities/opc.py +++ b/laborious/activities/opc.py @@ -134,7 +134,7 @@ class OPC(BaseActivity): level=NotificationLevel.ERROR, attachment_content=f"OPC servers: {list(self.opc_repository.keys())}" ) - continue + success = False if 'prediction_tags' in config: for tag, tag_config in config['prediction_tags'].items(): diff --git a/values.yaml b/values.yaml index 5d86e41..3a54067 100644 --- a/values.yaml +++ b/values.yaml @@ -123,7 +123,7 @@ env: - name: GITHUB_REPO_URL value: "git@github.com:Aignosi/sientia-dataops-laborious_temporal.git" - name: GITHUB_BRANCH - value: "SIENTIAPDE-1163-alterar-dinamica-de-notificacoes-para-usar-o-mongodb-ao-inves-do-kafka" + value: "SIENTIAPDE-1151-criar-testes-de-stress" - name: PYTHON_APP value: "laborious.worker.worker"