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

   ### What changes were proposed in this pull request?
   
   This PR aims to make `ConfigOption` handle invalid values consistently.
   - Parse a Boolean value like Apache Spark, i.e. `true` or `false` in any 
case, ignoring surrounding whitespace.
   - Use the default value for an invalid value, including one which resolves 
to `null` like `null`.
   - Log each invalid value once as a warning.
   
   ### Why are the changes needed?
   
   Since every option uses a boxed type like `Boolean.class`, Jackson parses 
every non-String value. So, `False` falls back to the default value, `0` and 
`1` are taken as `false` and `true`, and `null` resolves to `null`, which 
causes `NullPointerException`. In addition, an invalid value is logged as an 
error with a stack trace on every read.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. A Boolean value like `False` or `TRUE` is respected now, while `0`, 
`1`, `yes`, `off` or `null` falls back to the default value. The migration 
guide is updated.
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added test cases.
   
   ### 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: [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