[Dev][Experimental] Check for ManagedJobInfo protobuf going out of sync with new columns #7984
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.
Just exploring a random idea. In general, it seems like in our codebase, we have quite a few "rules" we define (mostly in CONTRIBUTING.md and as code comments), but have no way to enforce them automatically. It relies on either the PR author or reviewer remembering to follow it, and thus could be prone to human errors.
These are things like:
API_VERSIONif you make an API changeSKYLET_VERSIONif you make a change that requires restarting the skyletWe've also faced issues where the gRPC and non-gRPC code path for jobs had a minor divergence, where some fields were missing from the gRPC code path, etc.
This PR is an experiment to see if it's feasible and scalable to do such automated checks for these rules. This example uses LibCST from the instagram python team.
I guess another way of thinking about this is, if such rules are able to be enforced programmatically, then should we just have those parts of the code be fully codegen'ed and not manually touched?
Preview:

Tested (run the relevant ones):
bash format.sh/smoke-test(CI) orpytest tests/test_smoke.py(local)/smoke-test -k test_name(CI) orpytest tests/test_smoke.py::test_name(local)/quicktest-core(CI) orpytest tests/smoke_tests/test_backward_compat.py(local)