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

   **Description**
   
   This PR is a follow-up for PR #61153. It performs a non-functional cleanup 
of the Celery executor to better align it with the workload-based execution 
model being introduced in Airflow 3.2.
   
   The changes include:
   
   - Renaming task-centric methods and variables to use workload-oriented 
terminology where appropriate.
   - Updating type annotations to consistently use workload abstractions (e.g. 
`WorkloadKey`, `WorkloadInCelery`, `workloads.All`).
   - Improving docstrings and inline comments to reflect workload-based 
semantics.
   - Minor naming improvements to reduce ambiguity.
   - Adding missing periods to, fixing capitilization in, and rephrasing 
docstrings and comments where needed.
   
   Method renames were applied selectively:
   
   - Internal helper methods and non-public interfaces were updated to reflect 
workload terminology
   - Methods closely tied to Celery internals or mirroring `BaseExecutor` / 
scheduler-invoked interfaces were left unchanged to preserve compatibility
   
   No behavioral or functional changes are introduced.
   
   **Rationale**
   
   The Celery executor already supports workload-based execution, but parts of 
the implementation still reflect legacy task-centric terminology. This PR 
standardizes naming, typing, and documentation to improve consistency and 
readability.
   
    - **Method names** were updated where safe (i.e. internal helpers not part 
of public or inherited interfaces). Methods that mirror `BaseExecutor`, are 
invoked by the scheduler, or are tightly coupled to Celery internals were 
intentionally left unchanged to avoid breaking contracts.
   
   - **Variables** were renamed from “task” to “workload” where they represent 
Airflow execution units. Fields inherited from `BaseExecutor` (e.g. 
`queued_tasks`) and Celery-specific concepts (e.g. `task_id`) were preserved to 
maintain compatibility and clarity.
   
   - **Docstrings and comments** were updated to consistently describe 
workloads while still distinguishing between Airflow workloads and Celery tasks 
where necessary.
   
   - **Typing** was improved by preferring workload-based types while retaining 
legacy aliases required for compatibility across Airflow versions.
   
   **Notes**
   
   Metrics (`Stats.incr`) and configuration paths were intentionally left 
unchanged, as they form part of Airflow’s external/operational interface (e.g. 
dashboards, alerts, and user configs). Renaming these could introduce 
unintended breaking changes or disrupt existing observability. This change is 
therefore scoped to internal naming, typing, and documentation updates only, 
without altering behavior or externally visible contracts.
   
   **Related**
   
   * PR #61153
   * Issue #62887


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