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

   ### Description
   
   The `ResumableJobMixin` implementation for `SparkSubmitOperator` previously 
had YARN, Kubernetes, and Standalone backend logics interleaved directly inside 
each mixin method. This scattered per-backend logic across multiple methods. 
Decoupling these by introducing specialized strategy classes per backend 
isolates the deployment-specific details, making the operator easier to 
maintain and extend.
   
   This refactor:
   - Defines private strategy classes (`_SparkSubmitDeploymentBackend`, 
`_KubernetesSparkSubmitBackend`, `_YarnSparkSubmitBackend`, 
`_StandaloneSparkSubmitBackend`) to cleanly isolate the status and execution 
tracking logic of each deployment mode.
   - Resolves and caches the active deployment strategy exactly once using a 
private `_backend` cached property on `SparkSubmitOperator`.
   - Delegates all mixin methods (`submit_job`, `get_job_status`, 
`is_job_active`, `is_job_succeeded`, `poll_until_complete`, `on_kill`) directly 
to the active backend strategy.
   
   This improves maintainability while keeping public namespaces completely 
clean.
   
   fixes #68505 
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (claude code)


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