Skip to content

fix(executor): retain coordinates for dispatched LocalExecutor tasks - #74216

Draft
mikamikasuki wants to merge 1 commit into
apache:mainfrom
mikamikasuki:fix/74207-local-executor-task-coordinates
Draft

mikamikasuki wants to merge 1 commit into
apache:mainfrom
mikamikasuki:fix/74207-local-executor-task-coordinates

Conversation

@mikamikasuki

Copy link
Copy Markdown

Retain each workload's task key in the running set after it is dequeued. This keeps the task coordinates available if the scheduler drains an empty event buffer before the worker reports the final state, avoiding a later KeyError while processing that result.

Fixes #74207

Tests: LocalExecutor unit tests (28 passed, 1 skipped); Ruff format and check passed.


Was generative AI tooling used to co-author this PR?
  • Yes (Codex)

Generated-by: Codex following https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions

@boring-cyborg boring-cyborg Bot added the area:Executors-core LocalExecutor & SequentialExecutor label Oct 5, 2026
@boring-cyborg

boring-cyborg Bot commented Oct 5, 2026

Copy link
Copy Markdown

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
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@mikamikasuki
mikamikasuki force-pushed the fix/74207-local-executor-task-coordinates branch from 54457be to 929aa25 Compare October 21, 2026 20:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Executors-core LocalExecutor & SequentialExecutor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduler warns "Discarding executor event ... may be locked by another scheduler" on every task retry under LocalExecutor

1 participant