23241a6749 opened a new pull request, #77339: URL: https://github.com/apache/airflow/pull/77339
Document how to share task construction in an importable function, reuse it for single or dynamically generated Dags, and test the shared structure independently of each Dag file. This continues the proposal by [sanederchik](https://github.com/sanederchik) in #50020 and the unmerged PRs #50441 and #51502. PR #51502 already demonstrated a shared module, single and multiple Dag creation, and unit tests; this revision retains that approach. The shorter example uses `airflow.sdk` for both `DAG` and `task`, explicit task inputs and a returned value to express the dependency. It adds parameterised construction checks and explains that they do not validate task execution or parsing of every deployed Dag file. Helper-package setup and links to existing guidance make the example self-contained. Closes #50020. Validation: - Regular and manual static checks passed against `upstream/main`. - Extracted the actual documentation examples and verified discovery of all three Dags, task dependencies and inputs against the source checkout. - Both documented pytest cases passed. - `breeze build-docs apache-airflow task-sdk` passed; both Sphinx warning logs were empty. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — OpenAI Codex (GPT-6) Generated-by: OpenAI Codex (GPT-6) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
