Log only execution identifiers when a workflow worker starts a run

Open Beginner friendly
#47,094 0 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@kinglegendzzh is already working on this.

Since Nov 24, 2026.

  • #47095 by @kinglegendzzh — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
observability

Research direction

The INFO call at the start of workflow_based_app_execution_task in api/tasks/app_generate/workflow_execute_task.py formats the whole exec_params object, which includes workflow inputs. Change it to log only exec_params.app_id and exec_params.workflow_run_id. Done when a captured INFO record contains the run ID and omits a sentinel value passed in the inputs, as the issue's suggested regression test describes.

Written by the indexing model from the issue text.

Description

Self Checks
  • I have read the contributing guide and the linked community guidance.
  • I searched existing issues, including closed issues.
  • This report is in English.
  • The required fields are filled in.
1. Is this request related to a challenge you're experiencing? Tell me about your story.

Could the worker log only the app ID and workflow run ID when it picks up a workflow? In Dify 1.17.1, the INFO message at the start of workflow_based_app_execution_task formats the entire exec_params object. That includes the workflow inputs. The same call is present in this revision of main.

We investigated a self-hosted worker that had picked up an ordinary reporting job. The client was waiting for the run to start and its run ID was still missing from the workflow logs. On the host, the worker was waiting to write to stdout. Its container log reader had stopped draining that stream. The workflow start message alone occupied roughly 125–177 KiB on one line. Other jobs sharing the worker could also be delayed.

2. Additional context or comments

We observed this on containerd 1.7.22 with nerdctl 1.7.7. An isolated container on the same host confirmed that the log reader continued after a short line but lost the following marker after a long line. This matches a known nerdctl log reader issue with an upstream fix. We verified the worker stall on this installation only. Independently of the collector, writing full inputs increases log volume and copies application data into operational logs.

We changed just the startup message in the test worker and restarted it:

logger.info(
    "Starting workflow execution app_id=%s workflow_run_id=%s",
    exec_params.app_id,
    exec_params.workflow_run_id,
)

With the change, a subsequent reporting workflow completed end to end, including one editorial revision. The resulting document was published and its preview and download had identical checksums. The two IDs were sufficient to correlate the worker event with the workflow. A regression test could capture the INFO record for synthetic inputs, assert that the run ID is present, and assert that a sentinel from the inputs is absent.

3. Can you help us with this feature?
  • I am interested in contributing to this feature.
Dominant language
Python
Stars
162k
Forks
25.6k
Avg merge
15h 9m
Merged PRs (30d)
606

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/dify

All issues in langgenius/dify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.