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 consistency check for types.go, CRDs, and generated API in GitHub Actions #546

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Sep 9, 2022

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

  1. Use ./hack/verify-codegen.sh to check the consistency between types.go and generated API.
  2. Use make manifests and tj-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

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@kevin85421 kevin85421 mentioned this pull request Sep 9, 2022
4 tasks
@kevin85421
Copy link
Member Author

cc @DmitriGekhtman

@DmitriGekhtman
Copy link
Collaborator

Minor process pointers:

  • You might already know this -- you can if you wish type something like Closes https://github.com/ray-project/kuberay/issues/521 to make sure that the issue is automatically closed after this PR is merged. (That helps simplify the admin work of closing issues.)

  • Do you have permissions necessary to add reviewers to your PRs? If not, let me know. If you do have permissions, then it's customary to add reviewers from the drop-down: typically add me, and also when appropriate/possible people involved in the original issue discussion.
    (Note that for Ray PRs, Anyscale follows the unconventional procedure of adding assignees rather than reviewers. For KubeRay PRs, you can use reviewers.)

Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super, this greatly improves the KubeRay development workflow!
Thanks for the super clear write-up of the manual test with a control group PR.

@DmitriGekhtman DmitriGekhtman merged commit b087da3 into ray-project:master Sep 12, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
… in GitHub Actions ray-project#546

As I mentioned in ray-project#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants