uranusjr commented on code in PR #74794:
URL: https://github.com/apache/airflow/pull/74794#discussion_r4548455618
##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -797,9 +828,47 @@ def claim_priority_files(self) -> list[DagFileInfo]:
Default implementation reads from the metadata DB; override to source
requests from an API.
Review Comment:
Still two things
First, `requires_acknowledgment` is a type check by another name, and the
manager branches on it. Several of these checks are unnecessary from what I can
tell; `DatabaseRequestedWorkSource.attempt_finished` and
`callbacks_interrupted` are already no-ops. In `_start_new_processes`, DB mode
still sends a busy priority file to `_files_awaiting_source` while API mode
requeues it at the front. Either make that one behavior, or move each decision
into a source method so the manager stops asking which source it has.
The source is wired in twice. `_create_requested_work_source` picks
ExecutionAPIWorkSource from both `api_client`, and `run_with_api` overwrites
both `api_client` and `work_source` on an already-built manager. Build the
manager with its client and source once, in the CLI, and drop the factory
branch.
--
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]