[Feature] Add consistency check for types.go, CRDs, and generated API in GitHub Actions #546
+52
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
As I mentioned in #519, the inconsistency between types.go, CRD YAML files, and generated API may cause wrong behaviors. Hence, we can add the consistency checks into GitHub Actions.
Implementation
make manifests
andtj-actions/verify-changed-files@v11.1
to check the consistency between types.go and CRD YAML files.Related issue number
#521
Checks
I used #547 as a control group. I updated rayjob_types.go without synchronizing with CRD YAML files and generated API. Hence, the new GitHub actions should detect the inconsistency and fail.
Result: https://github.com/ray-project/kuberay/actions/runs/3024449886