Skip to content

Fix ASYNC110 violation in edge3 worker#66192

Merged
potiuk merged 1 commit intoapache:mainfrom
astronomer:fix-async110-edge3-worker
May 1, 2026
Merged

Fix ASYNC110 violation in edge3 worker#66192
potiuk merged 1 commit intoapache:mainfrom
astronomer:fix-async110-edge3-worker

Conversation

@kaxil
Copy link
Copy Markdown
Member

@kaxil kaxil commented May 1, 2026

Summary

PR #66144 added a while job.is_running: await sleep(0.1) polling loop in providers/edge3/src/airflow/providers/edge3/cli/worker.py:557 to ensure the supervisor task has fully ended after results were grabbed from the queue. This trips ruff's ASYNC110 lint and is currently failing the static-checks job on every PR built against main (e.g., run 25191627167).

Fix

Apply the same pattern PR #66157 used for RedshiftDataTrigger: refactor while X: await sleep(...) to while True: if not X: break; await sleep(...). Same behaviour, ASYNC110-clean.

        # Ensure that supervisor really ended after we grabbed results from queue
-       while job.is_running:
-           await sleep(0.1)
+       while True:
+           if not job.is_running:
+               break
+           await sleep(0.1)

The proper fix (signalling completion via asyncio.Event from the supervisor instead of polling) is a larger refactor and can land separately.

Why this matters now

Every PR's CI image checks / Static checks job currently fails on this rule.


Was generative AI tooling used to co-author this PR?
  • [ ]

PR apache#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 apache#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.
@boring-cyborg boring-cyborg Bot added area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3 labels May 1, 2026
@potiuk potiuk merged commit c37960d into apache:main May 1, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants