dongjoon-hyun opened a new pull request, #911: URL: https://github.com/apache/spark-kubernetes-operator/pull/911
### What changes were proposed in this pull request? This PR aims to exclude `UWF_UNWRITTEN_FIELD` and `NP_UNWRITTEN_FIELD` for test classes (`~.*Test(\$.*)?`) in `spotbugs_exclude.xml`, and to remove them from the `@SuppressFBWarnings` of 10 test classes. ### Why are the changes needed? SpotBugs reports the fields injected by `@EnableKubernetesMockClient` as unwritten fields. However, SpotBugs drops these warnings by itself when more than 8 classes have such a field with the same name. Then, the class-level suppressions become useless and fail the build with `US_USELESS_SUPPRESSION_ON_CLASS`. Currently, 8 test classes have a `kubernetesClient` field. So, adding a new one breaks `spotbugsTest` on 5 unrelated test classes. Since SpotBugs applies `@SuppressFBWarnings` before the exclude filter, this PR removes the class-level suppressions too. ### Does this PR introduce _any_ user-facing change? No. This only affects the SpotBugs analysis of test classes. ### How was this patch tested? Pass the CIs. I also manually verified that adding a 9th test class with a `kubernetesClient` field breaks `spotbugsTest` before this PR, but not after it. ### 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]
