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

Check for breaking proto changes #6114

Merged
merged 21 commits into from
Jul 10, 2024
Merged

Check for breaking proto changes #6114

merged 21 commits into from
Jul 10, 2024

Conversation

dnr
Copy link
Member

@dnr dnr commented Jun 12, 2024

What changed?

  • Add (back) make target buf-breaking to run buf's breaking proto changes check against the parent commit and the main branch.
  • Add buf-breaking to ci-build-misc so it runs in CI.
  • Fix goimports target to use shell variables instead of git variables to make make faster, and also fix the binary name (was just broken).
  • GitHub Actions: run tests on PR head, not merge.

Why?

Detecting breaking proto changes early avoids bugs.

How did you test it?

Manual testing with deliberate breaking changes.

@dnr dnr requested a review from a team as a code owner June 12, 2024 14:14
check_against_commit HEAD^ "parent"

# Next check against main:
git -C "$tmp" fetch https://github.com/temporalio/temporal.git main
Copy link
Contributor

@tdeebswihart tdeebswihart Jun 12, 2024

Choose a reason for hiding this comment

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

Do we want to tell git to do a shallow/single-branch fetch here?
--depth 1 --single-branch

Copy link
Member Author

Choose a reason for hiding this comment

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

Only --depth=1 applies to fetch. I think in general I think the commit this is running on will be pretty close to main so I doubt it makes much difference but might as well.

@dnr
Copy link
Member Author

dnr commented Jun 12, 2024

I removed the buf upgrade from this PR. I couldn't get buf 1.32.2 to respect a config file (to change the compatibility level and add ignores) when using binpb inputs after trying many many combinations of flags and things. buf 1.6.0 respects the config file 🤷

@@ -0,0 +1,50 @@
#!/usr/bin/env bash

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be helpful to add a short comment at the top to summarize what the script is for. It took me a while to wrap me head around what was going on here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a bunch of comments

@dnr
Copy link
Member Author

dnr commented Jul 2, 2024

I removed the buf upgrade from this PR. I couldn't get buf 1.32.2 to respect a config file (to change the compatibility level and add ignores) when using binpb inputs after trying many many combinations of flags and things. buf 1.6.0 respects the config file 🤷

I filed a bug against buf and they fixed it. It'll probably be in buf 1.35.0. After that we can upgrade buf to use v2 configs if desired (but no rush)

@dnr dnr force-pushed the breaking branch 4 times, most recently from e017bb0 to ae24fd3 Compare July 2, 2024 13:49
@dnr
Copy link
Member Author

dnr commented Jul 2, 2024

I think this PR is broken.. GH is no longer running tests on push. Going to close/reopen to see if that fixes it

@dnr dnr closed this Jul 2, 2024
@dnr dnr reopened this Jul 2, 2024
@dnr
Copy link
Member Author

dnr commented Jul 2, 2024

Still not running tests, going to try with a new PR

@dnr dnr closed this Jul 2, 2024
@dnr dnr reopened this Jul 2, 2024
@dnr dnr force-pushed the breaking branch 3 times, most recently from 63fc8b0 to ee5ad98 Compare July 2, 2024 20:08
@dnr dnr merged commit d812429 into temporalio:main Jul 10, 2024
43 checks passed
@dnr dnr deleted the breaking branch July 10, 2024 23:44
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

4 participants