bramhanandlingala opened a new pull request, #69544:
URL: https://github.com/apache/airflow/pull/69544

   ## Description
   
   Issue #69441 flags exception handlers that catch overly broad types —
   bare `except:` or generic `except Exception:` — which can swallow signals
   like KeyboardInterrupt/SystemExit and hide real errors.
   
   I searched for bare `except:` clauses specifically, since those are the
   worst case (they catch BaseException, not just Exception). Excluding
   tests/docs/migrations, there were exactly two in the whole repo.
   
   **1. Task-SDK supervisor — coordinator initialization**
   This bare except meant an interrupt signal arriving during coordinator
   setup would get logged and re-raised instead of propagating immediately.
   Narrowed to `except Exception:` — real errors still get logged with the
   same context and re-raised as before, but Ctrl+C/SystemExit now pass
   through right away.
   
   I kept it at `Exception` rather than a more specific type (e.g.
   `ValueError`) because this call can also propagate exceptions from
   dynamically loaded third-party coordinator plugins, and I didn't want an
   unexpected failure there to skip the diagnostic log line.
   
   **2. Pytest plugin — test config loading fixture**
   This bare except did nothing but catch and immediately re-raise — no
   logging, no handling. The `finally` block right below it already covers
   the needed cleanup regardless of whether an exception occurs, so the
   except was dead code. Removed it.
   
   ### Scope
   Didn't touch the ~118 other `except Exception:` blocks in core — those
   already exclude KeyboardInterrupt/SystemExit so they're not the bug this
   issue describes, and a full rewrite to specific types is a much bigger,
   separate effort.
   
   related: #69441
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to