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

chore: Fix update-code.sh not generating proto files in subdirectories #1055

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

timostamm
Copy link
Contributor

This fixes an issue with integration/update-code.sh: There are several integration tests with proto files in subdirectories, but the script does not re-generate them. This means that it's possible to get false positives or false negatives from tests.

This PR not only updates the script, it also deletes several generated files, where the proto file was removed or renamed at some point, and the generated file wasn't deleted.

It also deletes one proto file: integration/simple-optionals/thing.proto is a duplicate of integration/simple-optionals/import_dir/thing.proto. The latter is imported by another proto file, and compiling them together results in a compiler error (meaning that no files will be generated):

thing.proto:6:29: "simple.ImportedThing.created_at" is already defined in file "import_dir/thing.proto".

I've verified that the updated script works as expected by deleting all generated files (see second commit), and re-generating them (third commit).

Determined which files to delete with `grep -r 'Code generated by' integration`. It also lists two go files that I'm ignoring here, they are not deleted.
@stephenh stephenh merged commit 16195d0 into stephenh:main Jun 6, 2024
6 checks passed
@stephenh
Copy link
Owner

stephenh commented Jun 7, 2024

🎉 This PR is included in version 1.176.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@timostamm timostamm deleted the fix-update-code branch June 7, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants