You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2026/04/09 06:02:18 UTC

[PR] [SPARK-56408] Introduce `OwnerResourceDecorator` and use it instead `(Driver|Cluster)Decorator` [spark-kubernetes-operator]

dongjoon-hyun opened a new pull request, #623:
URL: https://github.com/apache/spark-kubernetes-operator/pull/623

   ### What changes were proposed in this pull request?
   
   This PR refactors `DriverDecorator` and `ClusterDecorator` into a unified `OwnerResourceDecorator` class. Both decorators had nearly identical `decorate()` logic — adding owner references, labels, and namespace to Kubernetes resources — differing only in the owner type and label generation function.
   
   **Before:**
   - `DriverDecorator(SparkApplication)` → used `sparkAppResourceLabels(app)`
   - `ClusterDecorator(SparkCluster)` → used `sparkClusterResourceLabels(cluster)`
   
   **After:**
   - `OwnerResourceDecorator(HasMetadata owner, Map<String, String> labels)`
   
   ### Why are the changes needed?
   
   The two decorator classes contained duplicated code that only differed in the type of the owner resource and the label map. Consolidating them into a single class reduces code duplication and simplifies future maintenance.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Pass the CIs.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-4-6)


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56408] Introduce `OwnerResourceDecorator` and use it instead `(Driver|Cluster)Decorator` [spark-kubernetes-operator]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #623:
URL: https://github.com/apache/spark-kubernetes-operator/pull/623#issuecomment-4211873065

   Thank you, @viirya ~


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56408] Introduce `OwnerResourceDecorator` and use it instead `(Driver|Cluster)Decorator` [spark-kubernetes-operator]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #623: [SPARK-56408] Introduce `OwnerResourceDecorator` and use it instead `(Driver|Cluster)Decorator`
URL: https://github.com/apache/spark-kubernetes-operator/pull/623


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56408] Introduce `OwnerResourceDecorator` and use it instead `(Driver|Cluster)Decorator` [spark-kubernetes-operator]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #623:
URL: https://github.com/apache/spark-kubernetes-operator/pull/623#issuecomment-4211879685

   Merged to main


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org