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

   ### What changes were proposed in this pull request?
   
   This PR is a follow-up of #840 to change the label selector of the `Pod` 
informer in `SparkClusterReconciler` from `commonResourceLabelsStr()` to the 
existence selector `spark.operator/spark-cluster-name`, like the Kueue 
`Workload` informer.
   
   In addition, this PR adds a test assertion on the `Pod` informer's label 
selector.
   
   ### Why are the changes needed?
   
   #840 fixed the secondary-to-primary mapper, but no `SparkCluster` pod 
reaches the mapper yet. The informer selector `commonResourceLabelsStr()` 
expands to `spark.operator/name=spark-kubernetes-operator`. However, 
`OwnerResourceDecorator` writes these common labels only to the `StatefulSet` 
metadata, not to the pod templates. So master and worker pods only have the 
`spark-role`, `spark.operator/spark-cluster-name`, and `spark-version` labels, 
and the informer never lists or watches them.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The `Pod` informer now watches `SparkCluster` master and worker pods. 
Their events now requeue the owning `SparkCluster`, so a `Submitted` cluster 
retries `ClusterInitStep` immediately instead of waiting for the next scheduled 
requeue.
   
   ### How was this patch tested?
   
   Pass the CIs with the updated test case. The new assertion fails without the 
fix:
   
   ```
   expected: <spark.operator/spark-cluster-name> but was: 
<spark.operator/name=spark-kubernetes-operator>
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to