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

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new a9db7e26e4 issue #6498 (allow filtering by execution UUID) (#6728)
a9db7e26e4 is described below

commit a9db7e26e44d7b4e1d31110ac336ee71b84259d7
Author: Matt Casters <[email protected]>
AuthorDate: Sat Mar 7 09:04:23 2026 +0100

    issue #6498 (allow filtering by execution UUID) (#6728)
---
 .../apache/hop/execution/DefaultExecutionSelector.java  | 17 +++++++++++++++++
 .../org/apache/hop/execution/IExecutionSelector.java    |  5 +++++
 .../caching/BaseCachingExecutionInfoLocation.java       | 10 +++++++++-
 .../hop/neo4j/execution/NeoExecutionInfoLocation.java   |  6 ++++++
 .../perspective/execution/ExecutionPerspective.java     |  1 -
 5 files changed, 37 insertions(+), 2 deletions(-)

diff --git 
a/engine/src/main/java/org/apache/hop/execution/DefaultExecutionSelector.java 
b/engine/src/main/java/org/apache/hop/execution/DefaultExecutionSelector.java
index d6c2554bc0..56e70ab984 100644
--- 
a/engine/src/main/java/org/apache/hop/execution/DefaultExecutionSelector.java
+++ 
b/engine/src/main/java/org/apache/hop/execution/DefaultExecutionSelector.java
@@ -20,6 +20,7 @@ package org.apache.hop.execution;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.UUID;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hop.core.exception.HopException;
 
@@ -42,6 +43,9 @@ public record DefaultExecutionSelector(
     if (isSelectingPipelines && 
!execution.getExecutionType().equals(ExecutionType.Pipeline)) {
       return false;
     }
+    if (isSelectingByUuid()) {
+      return execution.getId().equalsIgnoreCase(filterText);
+    }
     if (StringUtils.isNotEmpty(filterText)) {
       boolean match = 
execution.getName().toLowerCase().contains(filterText.toLowerCase());
       match = match || execution.getId().contains(filterText);
@@ -96,4 +100,17 @@ public record DefaultExecutionSelector(
     }
     return selection;
   }
+
+  @Override
+  public boolean isSelectingByUuid() {
+    if (StringUtils.isEmpty(filterText)) {
+      return false;
+    }
+    try {
+      UUID.fromString(filterText);
+      return true;
+    } catch (Exception e) {
+      return false;
+    }
+  }
 }
diff --git 
a/engine/src/main/java/org/apache/hop/execution/IExecutionSelector.java 
b/engine/src/main/java/org/apache/hop/execution/IExecutionSelector.java
index e2a739ba33..bf5b1278cd 100644
--- a/engine/src/main/java/org/apache/hop/execution/IExecutionSelector.java
+++ b/engine/src/main/java/org/apache/hop/execution/IExecutionSelector.java
@@ -50,4 +50,9 @@ public interface IExecutionSelector {
    * @return true if the execution state gets selected using the selector 
parameters.
    */
   boolean isSelected(ExecutionState executionState);
+
+  /**
+   * @return True if the filter string is a UUID.
+   */
+  boolean isSelectingByUuid();
 }
diff --git 
a/engine/src/main/java/org/apache/hop/execution/caching/BaseCachingExecutionInfoLocation.java
 
b/engine/src/main/java/org/apache/hop/execution/caching/BaseCachingExecutionInfoLocation.java
index b6b7bc6838..c2c602fff6 100644
--- 
a/engine/src/main/java/org/apache/hop/execution/caching/BaseCachingExecutionInfoLocation.java
+++ 
b/engine/src/main/java/org/apache/hop/execution/caching/BaseCachingExecutionInfoLocation.java
@@ -257,6 +257,15 @@ public abstract class BaseCachingExecutionInfoLocation 
implements IExecutionInfo
   public List<String> findExecutionIDs(IExecutionSelector selector) throws 
HopException {
     Set<DatedId> dateIds = new HashSet<>();
 
+    if (selector.isSelectingByUuid()) {
+      // We try the cache and simply loading the file itself by ID.
+      //
+      CacheEntry cacheEntry = loadCacheEntry(selector.filterText());
+      if (cacheEntry != null) {
+        return List.of(cacheEntry.getId());
+      }
+    }
+
     // The data in the cache is the most recent, so we start with that.
     //
     getExecutionIdsFromCache(dateIds, selector);
@@ -273,7 +282,6 @@ public abstract class BaseCachingExecutionInfoLocation 
implements IExecutionInfo
 
     // Take only the first from the list
     //
-    int iLimit = datedIds.size();
     List<String> list = new ArrayList<>();
     for (DatedId datedId : datedIds) {
       list.add(datedId.getId());
diff --git 
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/execution/NeoExecutionInfoLocation.java
 
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/execution/NeoExecutionInfoLocation.java
index 6bb20bad1b..f5a5a96ca2 100644
--- 
a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/execution/NeoExecutionInfoLocation.java
+++ 
b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/execution/NeoExecutionInfoLocation.java
@@ -677,6 +677,12 @@ public class NeoExecutionInfoLocation implements 
IExecutionInfoLocation {
       builder.withWhereIsNull(firstCondition, "n", EP_PARENT_ID);
       firstCondition = false;
     }
+    // We filter by execution ID on the nodes because the filter text is a UUID
+    //
+    if (selector.isSelectingByUuid()) {
+      builder.withWhereEquals(firstCondition, "n", EP_ID, "pId", 
selector.filterText());
+      firstCondition = false;
+    }
     if (selector.isSelectingFailed()) {
       builder.withWhereEquals(firstCondition, "n", EP_FAILED, "pFailed", true);
       firstCondition = false;
diff --git 
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/ExecutionPerspective.java
 
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/ExecutionPerspective.java
index 4c21c7baec..8b6feb48f2 100644
--- 
a/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/ExecutionPerspective.java
+++ 
b/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/execution/ExecutionPerspective.java
@@ -720,7 +720,6 @@ public class ExecutionPerspective implements 
IHopPerspective, TabClosable {
                 if (execution != null) {
                   // Apply an extra filter to make sure
                   //
-
                   if (!executionSelector.isSelected(execution)) {
                     continue;
                   }

Reply via email to