Skip to content

Read a team's running task logs through the team's executor - #75255

Merged
vincbeck merged 2 commits into
apache:mainfrom
aws-mwaa:ghaeli/team-aware-task-log-executor
Oct 22, 2026
Merged

vincbeck merged 2 commits into
apache:mainfrom
aws-mwaa:ghaeli/team-aware-task-log-executor

Conversation

@seanghaeli

Copy link
Copy Markdown
Contributor

In multi-team mode, the API server reads a running task's live log through the global executor, never the task's team executor. Only the Kubernetes executors (and so AwsEksExecutor) fetch live logs through the executor, from the pod, so a team running one with its own namespace or cluster gets "Cannot find pod", or nothing at all when the global executor is a LocalExecutor. This resolves the executor the way the scheduler does: the team's own executor, else a global one, cached per team. Finished tasks and other executors aren't affected. Found while testing per-team clusters (#75251) on two real EKS clusters, where each team's live log now comes from its own cluster.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Opus 5.5) following the guidelines

@seanghaeli
seanghaeli marked this pull request as ready for review October 20, 2026 22:38
@seanghaeli

Copy link
Copy Markdown
Contributor Author

Tagging @o-nikolas @vincbeck as this is a general multi-team fix

In multi-team mode, the API server reads a running task's logs through the
global default executor, or looks up the task's named executor in the
global scope only. A team's executor has its own config, such as the
cluster its KubernetesExecutor pods run on, so a team task's live logs came
from the wrong executor: nothing from a global LocalExecutor, or "Cannot
find pod" from a global KubernetesExecutor on another cluster.

Resolve the executor the same way the scheduler does: the team's executor,
and a global one if the team doesn't have it.
@seanghaeli
seanghaeli force-pushed the ghaeli/team-aware-task-log-executor branch from d8951f4 to 7594e76 Compare October 21, 2026 17:01
@o-nikolas o-nikolas added the backport-to-v3-4-test Backport to v3-4-test label Oct 21, 2026
Move the log reader's lookup to ExecutorLoader.resolve_executor_name, so the
scheduler can call the same function instead of its own loop. A match from the
task's team, by alias, module path or class name, wins over a global one, the
first match wins among equals, and another team's executor never matches.
@vincbeck
vincbeck merged commit 1e3a232 into apache:main Oct 22, 2026
85 checks passed
@vincbeck
vincbeck deleted the ghaeli/team-aware-task-log-executor branch October 22, 2026 13:39
@github-actions github-actions Bot modified the milestone: Airflow 3.4.1 Oct 22, 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.4.1 based on: backport label targeting v3-4-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

1 similar comment
@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.4.1 based on: backport label targeting v3-4-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-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-4-test PR Link

github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
…or (#75255)

In multi-team mode, the API server reads a running task's logs through the
global default executor, or looks up the task's named executor in the
global scope only. A team's executor has its own config, such as the
cluster its KubernetesExecutor pods run on, so a team task's live logs came
from the wrong executor: nothing from a global LocalExecutor, or "Cannot
find pod" from a global KubernetesExecutor on another cluster.

Resolve the executor the same way the scheduler does: the team's executor,
and a global one if the team doesn't have it.
(cherry picked from commit 1e3a232)

Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-4-test. View the failure log Run details

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-4-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 1e3a232 v3-4-test

This should apply the commit to the v3-4-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 22, 2026
…or (apache#75255)

In multi-team mode, the API server reads a running task's logs through the
global default executor, or looks up the task's named executor in the
global scope only. A team's executor has its own config, such as the
cluster its KubernetesExecutor pods run on, so a team task's live logs came
from the wrong executor: nothing from a global LocalExecutor, or "Cannot
find pod" from a global KubernetesExecutor on another cluster.

Resolve the executor the same way the scheduler does: the team's executor,
and a global one if the team doesn't have it.
(cherry picked from commit 1e3a232)

Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Oct 22, 2026
…or (#75255) (#75408)

In multi-team mode, the API server reads a running task's logs through the
global default executor, or looks up the task's named executor in the
global scope only. A team's executor has its own config, such as the
cluster its KubernetesExecutor pods run on, so a team task's live logs came
from the wrong executor: nothing from a global LocalExecutor, or "Cannot
find pod" from a global KubernetesExecutor on another cluster.

Resolve the executor the same way the scheduler does: the team's executor,
and a global one if the team doesn't have it.
(cherry picked from commit 1e3a232)

Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants