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 6f6262b329 Enhance logging for pipeline and workflow execution events
with detailed messages (#6089)
6f6262b329 is described below
commit 6f6262b32922b3854a55ce1048b9f524a064386b
Author: kxs-mtalbi <[email protected]>
AuthorDate: Tue Dec 2 08:50:05 2025 -0500
Enhance logging for pipeline and workflow execution events with detailed
messages (#6089)
---
.../ui/hopgui/file/pipeline/HopGuiPipelineGraph.java | 19 +++++++++++++++----
.../ui/hopgui/file/workflow/HopGuiWorkflowGraph.java | 20 +++++++++++++++-----
.../file/workflow/messages/messages_en_US.properties | 4 ++--
.../hop/ui/hopgui/messages/messages_en_US.properties | 6 +++---
4 files changed, 35 insertions(+), 14 deletions(-)
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
index 82898c30f5..6befb1fa18 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
@@ -4110,13 +4110,16 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
preparePipeline(parentThread);
});
- log.logBasic(BaseMessages.getString(PKG,
"PipelineLog.Log.StartedExecutionOfPipeline"));
+ log.logBasic(
+ BaseMessages.getString(
+ PKG, "PipelineLog.Log.StartedExecutionOfPipeline",
pipelineMeta.getName()));
updateGui();
// Update the GUI at the end of the pipeline
//
pipeline.addExecutionFinishedListener(e -> pipelineFinished());
+ pipeline.addExecutionStoppedListener(e -> pipelineStopped());
}
} else {
modalMessageDialog(
@@ -4145,6 +4148,13 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
updateGui();
}
+ private void pipelineStopped() {
+ log.logBasic(
+ BaseMessages.getString(
+ PKG, "PipelineLog.Log.ProcessingOfPipelineStopped",
pipelineMeta.getName()));
+ updateGui();
+ }
+
private void addRowsSamplerToPipeline(IPipelineEngine<PipelineMeta>
pipeline) {
if (!(pipeline.getPipelineRunConfiguration().getEngineRunConfiguration()
@@ -4448,7 +4458,6 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
if ((isRunning() && !halting)) {
halting = true;
pipeline.stopAll();
- log.logBasic(BaseMessages.getString(PKG,
"PipelineLog.Log.ProcessingOfPipelineStopped"));
halted = false;
halting = false;
@@ -4581,8 +4590,10 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
}
private void checkPipelineEnded() {
- if (pipeline != null && (pipeline.isFinished() && (isRunning() ||
halted))) {
- log.logBasic(BaseMessages.getString(PKG,
"PipelineLog.Log.PipelineHasFinished"));
+ if (pipeline != null && (pipeline.isFinished() && (!isRunning() ||
halted))) {
+ log.logBasic(
+ BaseMessages.getString(
+ PKG, "PipelineLog.Log.PipelineHasFinished",
pipelineMeta.getName()));
initialized = false;
halted = false;
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
index 2c81284f9b..fc98833de8 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
@@ -1577,7 +1577,6 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
if ((isRunning() && !halting)) {
halting = true;
workflow.stopExecution();
- log.logBasic(BaseMessages.getString(PKG,
"WorkflowLog.Log.ProcessingOfWorkflowStopped"));
halting = false;
@@ -3791,9 +3790,8 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
// Attach a listener to notify us that the workflow has finished.
//
- workflow.addExecutionFinishedListener(
- workflow -> HopGuiWorkflowGraph.this.workflowFinished());
-
+ workflow.addExecutionFinishedListener(e ->
HopGuiWorkflowGraph.this.workflowFinished());
+ workflow.addExecutionStoppedListener(e ->
HopGuiWorkflowGraph.this.workflowStopped());
// Show the execution results views
//
addAllTabs();
@@ -3849,7 +3847,8 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
// Do a final check to see if it all ended...
//
if (workflow != null && workflow.isInitialized() && workflow.isFinished())
{
- log.logBasic(BaseMessages.getString(PKG,
"WorkflowLog.Log.WorkflowHasEnded"));
+ log.logBasic(
+ BaseMessages.getString(PKG, "WorkflowLog.Log.WorkflowHasEnded",
workflowMeta.getName()));
}
stopRedrawTimer();
@@ -3857,6 +3856,17 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
updateGui();
}
+ protected void workflowStopped() {
+ if (workflow != null && workflow.isInitialized() && workflow.isStopped()) {
+ log.logBasic(
+ BaseMessages.getString(
+ PKG, "WorkflowLog.Log.ProcessingOfWorkflowStopped",
workflowMeta.getName()));
+ }
+
+ stopRedrawTimer();
+ updateGui();
+ }
+
@Override
public IHasLogChannel getLogChannelProvider() {
return () -> getWorkflow() != null ? getWorkflow().getLogChannel() :
LogChannel.GENERAL;
diff --git
a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/messages/messages_en_US.properties
b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/messages/messages_en_US.properties
index 8219124d52..4b12332932 100644
---
a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/messages/messages_en_US.properties
+++
b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/messages/messages_en_US.properties
@@ -169,8 +169,8 @@ WorkflowLog.Dialog.WorkflowHasChangedSave.Title=File has
changed\!
WorkflowLog.Dialog.WorkflowIsAlreadyRunning.Message=This workflow is already
running, and must complete before it can run again.
WorkflowLog.Dialog.WorkflowIsAlreadyRunning.Title=Warning\!
WorkflowLog.Log.AutoSaveFileBeforeRunning=Save file automatically before
running...
-WorkflowLog.Log.ProcessingOfWorkflowStopped=Processing of the workflow has
stopped.
+WorkflowLog.Log.ProcessingOfWorkflowStopped=Stopped processing workflow
''{0}''.
WorkflowLog.Log.StartingWorkflow=Starting workflow
-WorkflowLog.Log.WorkflowHasEnded=Workflow execution has ended
+WorkflowLog.Log.WorkflowHasEnded=Workflow ''{0}'' completed.
WorkflowLog.System.ERROR=ERROR
WorkflowLog.System.EXCEPTION=EXCEPTION
diff --git
a/ui/src/main/resources/org/apache/hop/ui/hopgui/messages/messages_en_US.properties
b/ui/src/main/resources/org/apache/hop/ui/hopgui/messages/messages_en_US.properties
index dd7820a9d6..6acde504b2 100644
---
a/ui/src/main/resources/org/apache/hop/ui/hopgui/messages/messages_en_US.properties
+++
b/ui/src/main/resources/org/apache/hop/ui/hopgui/messages/messages_en_US.properties
@@ -250,12 +250,12 @@
PipelineLog.Dialog.UnexpectedErrorDuringPreview.Message=There was an unexpected
PipelineLog.Dialog.UnexpectedErrorDuringPreview.Title=Unexpected error during
preview
PipelineLog.Log.DoPreview=PREVIEW\!\!\!
PipelineLog.Log.LaunchingPipeline=Launching pipeline [
-PipelineLog.Log.PipelineHasFinished=The pipeline has finished\!\!
+PipelineLog.Log.PipelineHasFinished=Pipeline ''{0}'' completed.
PipelineLog.Log.PipelineOpened=Pipeline opened.
-PipelineLog.Log.ProcessingOfPipelineStopped=Processing of pipeline stopped.
+PipelineLog.Log.ProcessingOfPipelineStopped=Stopped processing pipeline
''{0}''.
PipelineLog.Log.SafeStopAlreadyStarted=It looks like the pipeline is already
in the process of being stopped. Please wait until it is finished.
PipelineLog.Log.SafeStopAlreadyStarted.Title=Unable to Stop
-PipelineLog.Log.StartedExecutionOfPipeline=Started the pipeline execution.
+PipelineLog.Log.StartedExecutionOfPipeline=Started executing pipeline ''{0}''.
PipelineLog.System.ERROR=ERROR
PipelineLog.System.ERROR2=ERROR
PipelineLog.System.EXCEPTION=EXCEPTION