Fix KeyError when log event is missing 'level' key in TriggerRunner#66060
Fix KeyError when log event is missing 'level' key in TriggerRunner#66060Srujan-rai wants to merge 1 commit into
Conversation
Triggerer subprocess log reader called `event.pop("level")` without a
default, raising KeyError when a structlog event omits the "level" field.
Changed to `event.pop("level", "warning")` so missing-level events are
logged at WARNING instead of crashing the log processing loop.
Added tests covering missing level, unknown level, and valid level paths.
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
|
@Srujan-rai This PR has been converted to draft because the Issues found:
What to do next:
Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. No rush — take your time. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
Triggerer subprocess log reader called
event.pop("level")without adefault, raising KeyError when a structlog event omits the "level" field.
Changed to
event.pop("level", "warning")so missing-level events arelogged at WARNING instead of crashing the log processing loop.
Added tests covering missing level, unknown level, and valid level paths.