This is an automated email from the ASF dual-hosted git repository.

tenthe pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new bc7f253bce fix(#4479): reset endpoint fails when pipeline has missing 
health status (#4480)
bc7f253bce is described below

commit bc7f253bce24975c60f74327c9dbd7c9ead9a980
Author: Philipp Zehnder <[email protected]>
AuthorDate: Mon May 18 11:27:11 2026 +0200

    fix(#4479): reset endpoint fails when pipeline has missing health status 
(#4480)
---
 .../manager/execution/task/StorePipelineStatusTask.java    | 14 +++++++++++++-
 .../streampipes/manager/pipeline/PipelineManager.java      |  2 ++
 .../enrich-jvm/jsEvaluator1/description.json               |  2 +-
 .../enrich-jvm/jsEvaluator2/description.json               |  2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git 
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
 
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
index 2797c77ebc..e5f465190c 100644
--- 
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
+++ 
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/execution/task/StorePipelineStatusTask.java
@@ -80,10 +80,22 @@ public class StorePipelineStatusTask implements 
PipelineExecutionTask {
     pipeline.setRunning(false);
     
pipelinesStats.updatePipelineRunningState(pipeline.getElementId(),pipeline.getName()
                                                                   , false);
-    
pipelinesStats.updatePipelineHealthState(pipeline.getElementId(),pipeline.getName(),
 pipeline.getHealthStatus().toString());
+    pipelinesStats.updatePipelineHealthState(
+        pipeline.getElementId(),
+        pipeline.getName(),
+        getHealthStatus(pipeline).toString()
+    );
     getPipelineStorageApi().updateElement(pipeline);
   }
 
+  private PipelineHealthStatus getHealthStatus(Pipeline pipeline) {
+    if (pipeline.getHealthStatus() == null) {
+      pipeline.setHealthStatus(PipelineHealthStatus.OK);
+    }
+
+    return pipeline.getHealthStatus();
+  }
+
   private IPipelineStorage getPipelineStorageApi() {
     return StorageDispatcher.INSTANCE.getNoSqlStore().getPipelineStorageAPI();
   }
diff --git 
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/pipeline/PipelineManager.java
 
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/pipeline/PipelineManager.java
index 0da4b65eca..23bbfec454 100644
--- 
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/pipeline/PipelineManager.java
+++ 
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/pipeline/PipelineManager.java
@@ -26,6 +26,7 @@ import 
org.apache.streampipes.manager.storage.PipelineStorageService;
 import org.apache.streampipes.model.base.NamedStreamPipesEntity;
 import org.apache.streampipes.model.client.user.Permission;
 import org.apache.streampipes.model.pipeline.Pipeline;
+import org.apache.streampipes.model.pipeline.PipelineHealthStatus;
 import org.apache.streampipes.model.pipeline.PipelineOperationStatus;
 import org.apache.streampipes.resource.management.CrudResourceManager;
 import org.apache.streampipes.storage.api.pipeline.IPipelineStorage;
@@ -181,6 +182,7 @@ public class PipelineManager {
   ) {
     pipeline.setPipelineId(pipelineId);
     pipeline.setRunning(false);
+    pipeline.setHealthStatus(PipelineHealthStatus.OK);
     pipeline.setCreatedByUser(username);
     pipeline.setCreatedAt(new Date().getTime());
     pipeline.getSepas()
diff --git 
a/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator1/description.json 
b/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator1/description.json
index 0caa87b4c4..20e4d8d64f 100644
--- 
a/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator1/description.json
+++ 
b/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator1/description.json
@@ -4,7 +4,7 @@
     {
       "type": "code-input",
       "selector": "jsFunction",
-      "value": "function process(event) {\n return event;"
+      "value": "function process(event) {\n return event;\n}"
     }
   ],
   "output": {
diff --git 
a/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator2/description.json 
b/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator2/description.json
index 784bb036a4..ef5513ec6c 100644
--- 
a/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator2/description.json
+++ 
b/ui/cypress/fixtures/pipelineElement/enrich-jvm/jsEvaluator2/description.json
@@ -4,7 +4,7 @@
     {
       "type": "code-input",
       "selector": "jsFunction",
-      "value": "function process(event) {\n  event.plusone = event.numberlist 
+ 1;\n return event;"
+      "value": "function process(event) {\n  event.plusone = event.numberlist 
+ 1;\n return event;\n}"
     }
   ],
   "output": {

Reply via email to