dheerajturaga opened a new pull request, #75155: URL: https://github.com/apache/airflow/pull/75155
### Stack Stacks on #75154. Stack index: 7 of 20. Its base is the branch of #75154, so the diff shows only this layer's commit, "AIP-125: Add the inbound webhooks app and delivery pipeline". ### Status Draft. [AIP-125 (Inbound Webhooks)](https://lists.apache.org/thread/p3dpnor4zwko8tldpncj6ftj1bpp18q7) is under discussion on dev@ and not yet voted; this stack is its proof of concept so that voters can run it, and nothing should merge before the vote. The feature is opt-in (only `airflow api-server --apps webhooks` serves deliveries) and experimental; no unauthenticated route is reachable until stack PR 18, which merges last. ### Why Inbound webhooks need an endpoint that anyone can reach and that writes to the metadata database on a sender's signature alone. Landing the app unmounted lets its routes, the order of its checks and its status codes be reviewed before any process serves it. Until Dags can subscribe (stack PR 15), each delivery is recorded as `no_subscribers`, and a retry is recognised by its id and body rather than recorded twice. ### What to look at - Routes: exactly `GET /_health`, `POST /{name}` and `POST /{name}/`; no docs or OpenAPI. - Order: name, connection, body limit, verification, handshake, parsing, one transaction. Answers 404, 401, 413, 400, 503 with Retry-After, 202, or 200 for a duplicate. - A repeat must match the id and the body digest, since the id travels in an unsigned header. - Unhandled errors get a bare 500 from a pure ASGI middleware, logged at most once a minute. Not `init_error_handlers`, which can return SQL under `[api] expose_stacktrace`, nor an `Exception` handler, which Starlette re-raises into Uvicorn's log. ### Testing - `test_app.py` and `test_pipeline_concurrency.py`, which races copies over real database connections, passed under breeze on SQLite, Postgres and MySQL. After the last fixes, the tests were rerun on SQLite and Postgres, and the final head passed again on MySQL. ### Known limitations - Every `OperationalError` is answered 503. MySQL's connection, lock and deadlock codes are not told apart from other codes, which would be bugs (500); no known delivery reaches those other codes. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number. -- 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]
