Skip to content

Respect dag processor config option to show parsing logs on stdout - #65528

Merged
ashb merged 2 commits into
mainfrom
worktree-dag-proc-stdout-again
Apr 20, 2026
Merged

ashb merged 2 commits into
mainfrom
worktree-dag-proc-stdout-again

Conversation

@ashb

@ashb ashb commented Apr 20, 2026

Copy link
Copy Markdown
Member

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file
@ashb
ashb merged commit 1193073 into main Apr 20, 2026
111 checks passed
@ashb
ashb deleted the worktree-dag-proc-stdout-again branch April 20, 2026 14:33
@github-actions github-actions Bot added this to the Airflow 3.2.2 milestone Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.2.2 based on: backport label targeting v3-2-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

github-actions Bot pushed a commit that referenced this pull request Apr 20, 2026
…on stdout (#65528)

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.
(cherry picked from commit 1193073)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-2-test PR Link

ashb added a commit that referenced this pull request Apr 20, 2026
…on stdout (#65528) (#65541)

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.
(cherry picked from commit 1193073)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 23, 2026
…on stdout (#65528) (#65541)

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.
(cherry picked from commit 1193073)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 27, 2026
…on stdout (#65528) (#65541)

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.
(cherry picked from commit 1193073)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request May 20, 2026
…on stdout (#65528) (#65541)

This is very useful when running things in a container, where it's much easier
to get container logs than files on disk.

This config option was added in 2.4.0 but got broken around 3.0 or 3.1. Most
of capabilities existed already, we just needed to pass the right value down.

Example log line:

```
2026-04-20T10:44:13.977892Z [info     ] Ptint from dag [dag_processor.stdout] bundle_name=main dag_file=dags/example_dag_advanced.py
```

Since we've got structured logging now it includes the bundle name and rel
path of the dag file.
(cherry picked from commit 1193073)

Co-authored-by: Ash Berlin-Taylor <[email protected]>
luc-pimentel added a commit to luc-pimentel/airflow that referenced this pull request Oct 14, 2026
dag_processor_log_target = stdout should send the parse logs to stdout
instead of files, as the option's description says and as it worked in
Airflow 2. Every parse still appended to its file, with the stdout output
from apache#65528 on top, so the log directory kept growing although nothing
reads or removes those files.

Sending the parse process's own logger to stdout, tagged with the Dag file
and bundle, also brings the supervisor's messages about a failed parse to
stdout, and keeps each line from being printed twice.
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.

2 participants