This is an automated email from the ASF dual-hosted git repository.
dheerajturaga pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d24297f6582 Change log level from info to debug for Edge job fetch
(#68736)
d24297f6582 is described below
commit d24297f6582265f9b14a210853b8966284caf62f
Author: KidAmnesiac1 <[email protected]>
AuthorDate: Sat Jul 11 02:23:02 2026 +0800
Change log level from info to debug for Edge job fetch (#68736)
* Change log level from info to debug for Edge job fetch
This changes the log level of the "No new job to process" message in
`fetch_and_run_job()` from `logger.info` to `logger.debug`.
*Why*: An idle edge worker emits this message every job_poll_interval
seconds for as long as no work is queued. In many deployments, workers spend
the majority of their time idle — that's by design, since edge workers are
often provisioned for bursty or on-demand workloads. The result is that this
single message dominates the worker logs, drowning out genuinely useful
INFO-level entries like job starts, completions, state changes, and heartbeat
events.
Per Python's logging conventions, INFO should communicate "confirmation
that things are working as expected" — meaningful milestones and state
transitions. An idle worker having nothing to do is the expected steady state,
not a notable event. By contrast, DEBUG is the correct level for routine
operational chatter useful only when actively troubleshooting.
For comparison, the line immediately above it already uses the right level:
logger.debug("Attempting to fetch a new job..."). The "no job found" outcome is
the other half of the same operation and should match.
Impact: No behaviour change. Operators who want to see these messages can
still set the edge worker log level to DEBUG. Everyone else gets cleaner logs
at the default INFO level.
* Update log message in docs
---
providers/edge3/docs/deployment.rst | 4 ++--
providers/edge3/src/airflow/providers/edge3/cli/worker.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/providers/edge3/docs/deployment.rst
b/providers/edge3/docs/deployment.rst
index 0d7e9b17041..68350bfc9d1 100644
--- a/providers/edge3/docs/deployment.rst
+++ b/providers/edge3/docs/deployment.rst
@@ -118,7 +118,7 @@ Execution API") for the security boundary.
.. code-block:: bash
airflow edge worker
- 2025-09-27T12:28:32.954316Z [info ] Starting worker with API endpoint
http://localhost:8080/edge_worker/v1/rpcapi
+ 2026-07-09T12:28:32.954316Z [info ] Starting worker with API endpoint
http://localhost:8080/edge_worker/v1/rpcapi
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
@@ -130,7 +130,7 @@ Execution API") for the security boundary.
/___/\_,_/\_, /\__/ |__/|__/\___/_/ /_/\_\\__/_/
/___/
- 2025-09-27T12:28:33.171525Z [info ] No new job to process
+ 2026-07-09T12:28:33.171525Z [debug ] No new job to process
To start a worker assigned to a specific team:
diff --git a/providers/edge3/src/airflow/providers/edge3/cli/worker.py
b/providers/edge3/src/airflow/providers/edge3/cli/worker.py
index 81ebe46c341..4f29b8238cb 100644
--- a/providers/edge3/src/airflow/providers/edge3/cli/worker.py
+++ b/providers/edge3/src/airflow/providers/edge3/cli/worker.py
@@ -674,7 +674,7 @@ class EdgeWorker:
logger.debug("Attempting to fetch a new job...")
edge_job = await jobs_fetch(self.hostname, self.queues,
self.free_concurrency, self.team_name)
if not edge_job:
- logger.info(
+ logger.debug(
"No new job to process%s",
f", {len(self.jobs)} still running" if self.jobs else "",
)