kuberay icon indicating copy to clipboard operation
kuberay copied to clipboard

[Feature] Generate new manifest and update generated API in pre-commit hook

Open kevin85421 opened this issue 3 years ago • 2 comments
trafficstars

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.

  1. types.go should be synchronized with the CRD YAML file.
make manifests
  1. types.go should 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!

kevin85421 avatar Sep 01 '22 00:09 kevin85421

cc @DmitriGekhtman @Jeffwan

kevin85421 avatar Sep 01 '22 00:09 kevin85421

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.

DmitriGekhtman avatar Sep 14 '22 17:09 DmitriGekhtman

The pre-commit hook seems not to be important. Contributors are comfortable with running commands manually.

kevin85421 avatar Sep 26 '23 22:09 kevin85421