This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new 27d1ee56628 [v3-3-test] Serve logs from scheduler if any executor is
LocalExecutor (#71283) (#71781)
27d1ee56628 is described below
commit 27d1ee5662801ab75e189259538ab3c57e250cdb
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Aug 18 18:58:42 2026 +0200
[v3-3-test] Serve logs from scheduler if any executor is LocalExecutor
(#71283) (#71781)
(cherry picked from commit 372b8ed40a29534f4c445870c99b56e36c1d7d55)
Co-authored-by: Christopher Anderson
<[email protected]>
---
airflow-core/src/airflow/cli/commands/scheduler_command.py | 7 +++++--
airflow-core/tests/unit/cli/commands/test_scheduler_command.py | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/cli/commands/scheduler_command.py
b/airflow-core/src/airflow/cli/commands/scheduler_command.py
index e40592d4e3c..2217717e50e 100644
--- a/airflow-core/src/airflow/cli/commands/scheduler_command.py
+++ b/airflow-core/src/airflow/cli/commands/scheduler_command.py
@@ -79,8 +79,11 @@ def _serve_logs(skip_serve_logs: bool = False):
sub_proc = None
if skip_serve_logs is False:
- executor_class, _ = ExecutorLoader.import_default_executor_cls()
- if executor_class.serve_logs:
+ executor_classes = [
+ ExecutorLoader.import_executor_cls(executor_name)[0]
+ for executor_name in (ExecutorLoader.get_executor_names())
+ ]
+ if any(executor_class.serve_logs for executor_class in
executor_classes):
sub_proc = Process(target=serve_logs)
sub_proc.start()
try:
diff --git a/airflow-core/tests/unit/cli/commands/test_scheduler_command.py
b/airflow-core/tests/unit/cli/commands/test_scheduler_command.py
index 2c9e995efab..1089edc12e8 100644
--- a/airflow-core/tests/unit/cli/commands/test_scheduler_command.py
+++ b/airflow-core/tests/unit/cli/commands/test_scheduler_command.py
@@ -44,6 +44,8 @@ class TestSchedulerCommand:
("CeleryExecutor", False),
("LocalExecutor", True),
("KubernetesExecutor", False),
+ ("LocalExecutor,KubernetesExecutor", True),
+ ("KubernetesExecutor,LocalExecutor", True),
],
)
@mock.patch("airflow.cli.commands.scheduler_command.SchedulerJobRunner")