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

build: don't require a specific protoc version #2743

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Jun 27, 2023

Let's dial down the strictness on the protobuf codegen story. Here we retain the docs changes from #2739, but drop the requirement for a specific major version of protoc. Similarly, we remove the CI check that fails if diffs are detected in the generated proto_descriptor.bin file, because often those diffs are cosmetic, rather than substantive. We preserve the CI check for ensuring there are no diff elsewhere in the codegen outputs.

Closes #2736.

@conorsch conorsch force-pushed the 2736-chiller-proto-linting branch from 85db24b to f2d6b21 Compare June 27, 2023 16:14
@conorsch conorsch temporarily deployed to smoke-test June 27, 2023 16:14 — with GitHub Actions Inactive
Comment on lines 81 to 92
./deployments/scripts/protobuf-codegen
s="$(git status --porcelain)"
if [[ -n "$s" ]]; then
echo "ERROR: protobuf files must be regenerated and committed."
echo "Run this command locally: ./deployments/scripts/protobuf-codegen"
echo "Make sure you're running protoc $(cut -f1 -d. <<< ${PROTOC_VERSION}).x locally."
echo "These are the files that reported differences:"
echo "$s"
exit 1
else
echo "OK: no changes required to protobuf specs"
fi
Copy link
Member

Choose a reason for hiding this comment

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

We do want to check for changes in the generated proto code, though, just not changes to the proto descriptor.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll make that change. That means we'll still have failing CI for some cosmetic-only changes such as https://github.com/penumbra-zone/penumbra/pull/2739/files#diff-4c7f8084527df765ac0133b6828891e9b82fb03557bacf323960235942b56c3aR3, but those should be easily sorted with a bit of visual inspection.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@conorsch conorsch force-pushed the 2736-chiller-proto-linting branch from f2d6b21 to 15e933e Compare June 27, 2023 16:38
Let's dial down the strictness on the protobuf codegen story.
Here we retain the docs changes from #2739, but drop the requirement for
a specific major version of `protoc`. Similarly, we remove the CI check
that fails if diffs are detected in the generated `proto_descriptor.bin`
file, because often those diffs are cosmetic, rather than substantive.
We preserve the CI check for ensuring there are no diff elsewhere in the
codegen outputs.

Closes #2736.
@conorsch conorsch force-pushed the 2736-chiller-proto-linting branch from 15e933e to e52ce11 Compare June 27, 2023 16:39
@conorsch conorsch temporarily deployed to smoke-test June 27, 2023 16:39 — with GitHub Actions Inactive
@conorsch conorsch merged commit d3b9495 into main Jun 27, 2023
@conorsch conorsch deleted the 2736-chiller-proto-linting branch June 27, 2023 22:49
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.

Newer versions of protoc don't regenerate proto descriptor
2 participants