Re: [PR] Register custom deadline references via plugins, matching timetable pattern [airflow]

2026-05-18 Thread via GitHub


github-actions[bot] commented on PR #66737:
URL: https://github.com/apache/airflow/pull/66737#issuecomment-4476332481

   ### Backport successfully created: v3-2-test
   
   Note: As of [Merging PRs targeted for Airflow 
3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
   the committer who merges the PR is responsible for backporting the PRs that 
are bug fixes (generally speaking) to the maintenance branches.
   
   In matter of doubt please ask in 
[#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) 
Slack channel.
   
   
   
   Status
   Branch
   Result
   
   
   ✅
   v3-2-test
   https://github.com/apache/airflow/pull/67098";>https://img.shields.io/badge/PR-67098-blue"; alt="PR Link">
   
   


-- 
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]



Re: [PR] Register custom deadline references via plugins, matching timetable pattern [airflow]

2026-05-18 Thread via GitHub


vatsrahul1001 merged PR #66737:
URL: https://github.com/apache/airflow/pull/66737


-- 
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]



Re: [PR] Register custom deadline references via plugins, matching timetable pattern [airflow]

2026-05-17 Thread via GitHub


potiuk commented on PR #66737:
URL: https://github.com/apache/airflow/pull/66737#issuecomment-4472300337

   I'd love to get this one merged — and would love it in 3.2.2 if it's not too 
late. cc @vatsrahul1001 (3.2.2 RM)
   
   ---
   Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting


-- 
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]



[PR] Register custom deadline references via plugins, matching timetable pattern [airflow]

2026-05-11 Thread via GitHub


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

   ## Summary
   
   Align custom deadline reference resolution with the existing 
plugin-registration pattern already used by 
[timetables](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/plugins_manager.py#L266)
 and [partition 
mappers](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/plugins_manager.py#L278).
   
   Before this change, `SerializedCustomReference.deserialize_reference()` 
resolved class paths via `import_string()` on the serialized `__class_path` 
value. After this change, custom deadline reference classes have to be 
registered via the new `deadline_references` attribute on `AirflowPlugin`, the 
same way custom timetables and custom partition mappers are registered.
   
   ## Files changed
   
   - `shared/plugins_manager/.../plugins_manager.py` — new 
`AirflowPlugin.deadline_references` attribute.
   - `airflow-core/.../plugins_manager.py` — new 
`get_deadline_references_plugins()`.
   - `airflow-core/.../serialization/helpers.py` — new 
`DeadlineReferenceNotRegistered` exception and 
`find_registered_custom_deadline_reference()`.
   - `airflow-core/.../serialization/definitions/deadline.py` — 
`SerializedCustomReference.deserialize_reference()` now uses the registry.
   - 
`airflow-core/tests/unit/serialization/test_deadline_reference_registry.py` — 
new tests covering registry hit/miss + serialization round-trip.
   - `airflow-core/docs/administration-and-deployment/plugins.rst` — document 
the new attribute.
   
   ## Migration
   
   Any project relying on inline DAG-author-defined custom deadline references 
will need to migrate to a registered plugin class. Core deadlines 
(`FixedDatetimeDeadline`, `DagRunLogicalDateDeadline`, 
`DagRunQueuedAtDeadline`, `AverageRuntimeDeadline`) are unaffected.
   
   ## Test plan
   
   - [ ] `uv run --project airflow-core pytest 
airflow-core/tests/unit/serialization/test_deadline_reference_registry.py -xvs`
   - [ ] `uv run --project airflow-core pytest 
airflow-core/tests/unit/models/test_deadline.py -xvs`
   - [ ] `prek run --from-ref upstream/main --stage pre-commit`
   - [ ] `uv run --project airflow-core --with 
"apache-airflow-devel-common[mypy]" mypy 
airflow-core/src/airflow/serialization/`
   
   # Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Opus 4.7 (1M context)
   
   Generated-by: Claude Opus 4.7 (1M context) following the guidelines at 
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]