Skip to content

[v3-3-test] Prevent scheduler crash when process/thread are missing from log format (#69402)#69787

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-fd7d535-v3-3-test
Jul 13, 2026
Merged

[v3-3-test] Prevent scheduler crash when process/thread are missing from log format (#69402)#69787
potiuk merged 1 commit into
v3-3-testfrom
backport-fd7d535-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

When a record reaches the percent formatter without callsite information,
for example a stdlib warning routed through the logging bridge, the process
and thread fields are absent. The formatter fell back to the "(unknown)"
string for them, so a format string using the numeric "%(process)d" or
"%(thread)d" specifiers raised "TypeError: %d format: a real number is
required" and could take down the scheduler at startup.

Give those two numeric callsite parameters a numeric fallback of 0, the same
way lineno is already handled, so the format never receives a string where a
number is expected.
(cherry picked from commit fd7d535)

Co-authored-by: Anas Khan anxkhn28@gmail.com

…rom log format (#69402)

When a record reaches the percent formatter without callsite information,
for example a stdlib warning routed through the logging bridge, the process
and thread fields are absent. The formatter fell back to the "(unknown)"
string for them, so a format string using the numeric "%(process)d" or
"%(thread)d" specifiers raised "TypeError: %d format: a real number is
required" and could take down the scheduler at startup.

Give those two numeric callsite parameters a numeric fallback of 0, the same
way lineno is already handled, so the format never receives a string where a
number is expected.
(cherry picked from commit fd7d535)

Co-authored-by: Anas Khan <anxkhn28@gmail.com>
@potiuk potiuk marked this pull request as ready for review July 12, 2026 23:43
@potiuk potiuk merged commit 4a04842 into v3-3-test Jul 13, 2026
65 checks passed
@potiuk potiuk deleted the backport-fd7d535-v3-3-test branch July 13, 2026 00:28
@github-actions github-actions Bot added this to the Airflow 3.3.1 milestone Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

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