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/09/28 15:06:01 UTC

[PR] [SPARK-59826] Do not serialize `is(Admitted|QuotaReserved|Finished)` of Kueue `WorkloadStatus` [spark-kubernetes-operator]

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

   ### What changes were proposed in this pull request?
   
   This PR aims to exclude the condition helpers of the Kueue `WorkloadStatus`, `isAdmitted()`, `isQuotaReserved()` and `isFinished()`, from the JSON serialization by annotating them with `@JsonIgnore`.
   
   The helpers themselves are kept because they are used throughout the code.
   
   ### Why are the changes needed?
   
   Jackson auto-detects `boolean is*()` methods as properties. So, every serialized `WorkloadStatus` contains three extra fields which the Kueue `Workload` CRD does not have.
   
   ```
   {"conditions":[...],"quotaReserved":true,"admitted":true,"finished":false}
   ```
   
   For example, `KueueWorkloadUtils.finishWorkload` records the Kueue `Finished` condition with `editStatus`, and fabric8 builds a JSON Patch from the diff. So, the patch includes a `replace` operation for the non-existent `/status/finished` field.
   
   **BEFORE**
   
   ```
   [{"op":"add","path":"/status/conditions/2","value":{...}},{"op":"replace","path":"/status/finished","value":true}]
   ```
   
   **AFTER**
   
   ```
   [{"op":"add","path":"/status/conditions/2","value":{...}}]
   ```
   
   It currently works only because the API server's JSON Patch tolerates `replace` on a missing object key and the structural schema prunes the field. This is fragile, and every `Workload` create and update also sends these fields.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No for the released versions, because the Kueue integration is not released yet in [v1.0.0](https://github.com/apache/spark-kubernetes-operator/releases/tag/1.0.0) (2026-07-26).
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added test case in `WorkloadTest`. The JSON Patch bodies above were also checked manually with the fabric8 `KubernetesMockServer`.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.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: 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-59826] Do not serialize `is(Admitted|QuotaReserved|Finished)` of Kueue `WorkloadStatus` [spark-kubernetes-operator]

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

   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


Re: [PR] [SPARK-59826] Do not serialize `is(Admitted|QuotaReserved|Finished)` of Kueue `WorkloadStatus` [spark-kubernetes-operator]

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

   Thank you, @peter-toth !


-- 
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-59826] Do not serialize `is(Admitted|QuotaReserved|Finished)` of Kueue `WorkloadStatus` [spark-kubernetes-operator]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #898: [SPARK-59826] Do not serialize `is(Admitted|QuotaReserved|Finished)` of Kueue `WorkloadStatus`
URL: https://github.com/apache/spark-kubernetes-operator/pull/898


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