Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add tests covering CRD validation and JSON serialisation #2284

Open
Tom-Newton opened this issue Oct 24, 2024 · 0 comments
Open

[FEATURE] Add tests covering CRD validation and JSON serialisation #2284

Tom-Newton opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Tom-Newton
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

What is the outcome that you are trying to reach?

Avoid future bugs similar to what #2255 fixed.

Describe the solution you would like

  • Tests that ensure omitting spec or metadata in the SparkApplication fail CRD validation.
  • Tests that ensure optional fields still pass CRD validation after deserialization and re-serialisation by the validating webhook.

https://github.com/kubeflow/spark-operator/blob/0c49569afb2382738aabfe6ddbf5fddc577a6681/internal/webhook/sparkapplication_defaulter_test.go achieved this but was a kind of strange way to implement it.

Describe alternatives you have considered

No tests - pretty sure we don't want that.

Additional context

This is coming from discussion during PR review #2255 (comment) and I don't want it to get lost.

@Tom-Newton Tom-Newton added the enhancement New feature or request label Oct 24, 2024
@Tom-Newton Tom-Newton mentioned this issue Oct 24, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant