This is an automated email from the ASF dual-hosted git repository.
potiuk 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 c37960d5325 Fix ASYNC110 violation in edge3 worker (#66192)
c37960d5325 is described below
commit c37960d53250efee4241abd12f5a8456281fbbee
Author: Kaxil Naik <[email protected]>
AuthorDate: Fri May 1 04:45:57 2026 +0100
Fix ASYNC110 violation in edge3 worker (#66192)
PR #66144 added a `while job.is_running: await sleep(0.1)` polling loop
to ensure the supervisor task has fully ended after results were
grabbed from the queue. This trips ruff's ASYNC110 lint and is now
failing the static-checks job on every PR.
Apply the same pattern used in PR #66157 for RedshiftDataTrigger:
refactor to `while True: if not <cond>: break; await sleep(...)`. Same
behaviour, ASYNC110-clean. The proper fix (asyncio.Event signalled by
the supervisor on completion) is a larger change and can land
separately.
---
providers/edge3/src/airflow/providers/edge3/cli/worker.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/providers/edge3/src/airflow/providers/edge3/cli/worker.py
b/providers/edge3/src/airflow/providers/edge3/cli/worker.py
index c47c2063aad..2fa261b74f9 100644
--- a/providers/edge3/src/airflow/providers/edge3/cli/worker.py
+++ b/providers/edge3/src/airflow/providers/edge3/cli/worker.py
@@ -554,7 +554,9 @@ class EdgeWorker:
else results_queue.get()
)
# Ensure that supervisor really ended after we grabbed results from
queue
- while job.is_running:
+ while True:
+ if not job.is_running:
+ break
await sleep(0.1)
self.jobs.remove(job)