kuberay
kuberay copied to clipboard
[Feature] Generate new manifest and update generated API in pre-commit hook
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
We need to keep two things synchronizing with types.go.
types.goshould be synchronized with the CRD YAML file.
make manifests
types.goshould be synchronized with generated API (pkg/client)
./hack/update-codegen.sh # update generated API
./hack/verify-codegen.sh # Verify the consistency between types.go and generated API
In my opinion, we should do these synchronizations in 4 places. (1) build (2) test (3) run (4) pre-commit hook
Use case
The inconsistency may cause different behaviors.
Related issues
No response
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
cc @DmitriGekhtman @Jeffwan
The key part of the consistency check in the CI is done. Having this in
(1) build (2) test (3) run (4) pre-commit hook
would greatly improve the developer experience, but is somewhat less critical. Thus, will mark this with P2 (important but not urgent) priority.
The pre-commit hook seems not to be important. Contributors are comfortable with running commands manually.