Skip to content

[DSIP-107] Add separate workflow instance logs for UI viewing, similar to task logs.#18130

Open
njnu-seafish wants to merge 6 commits intoapache:devfrom
njnu-seafish:DSIP-107
Open

[DSIP-107] Add separate workflow instance logs for UI viewing, similar to task logs.#18130
njnu-seafish wants to merge 6 commits intoapache:devfrom
njnu-seafish:DSIP-107

Conversation

@njnu-seafish
Copy link
Copy Markdown
Contributor

Was this PR generated or assisted by AI?

NO

Purpose of the pull request

This is an implementation scheme for separating workflow logs. for #18129

Brief change log

Add separate workflow instance logs for UI viewing, similar to task logs.

Verify this pull request

I have already tested and verified this solution in my local environment.

The log_path field in the t_ds_workflow_instance table:
企业微信截图_17750360711830

Dedicated log files for workflow instances on the Master service:
企业微信截图_17750363662591

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

@SbloodyS SbloodyS changed the title [Dsip-107]Add separate workflow instance logs for UI viewing, similar to task logs. [DSIP-107] Add separate workflow instance logs for UI viewing, similar to task logs. Apr 3, 2026
@SbloodyS SbloodyS added the DSIP label Apr 3, 2026
SbloodyS and others added 4 commits April 3, 2026 15:52
# Conflicts:
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/dispatcher/WorkerGroupDispatcher.java
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/statemachine/AbstractWorkflowStateAction.java
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/failover/TaskFailover.java
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/TaskExecutorEventListenerImpl.java
#	dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/TaskInstanceControllerImpl.java
Comment on lines +99 to +104
workflowInstance.setLogPath(WorkflowLogUtils.getWorkflowInstanceLogFullPath(
workflowInstance.getStartTime(),
workflowInstance.getWorkflowDefinitionCode(),
workflowInstance.getWorkflowDefinitionVersion(),
workflowInstance.getId()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best to inject the log path at runtime. You can write the code at CommandEngine, can add a new field at WorkflowStartLifecycleEvent.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

@Setter
public class WorkflowLogDiscriminator extends AbstractDiscriminator<ILoggingEvent> {

private String key;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants