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

buf 1.32.2 breaking doesn't respect v2 config file when using binpb input #3080

Closed
dnr opened this issue Jun 13, 2024 · 5 comments · Fixed by #3111
Closed

buf 1.32.2 breaking doesn't respect v2 config file when using binpb input #3080

dnr opened this issue Jun 13, 2024 · 5 comments · Fixed by #3111
Labels
Bug Something isn't working

Comments

@dnr
Copy link

dnr commented Jun 13, 2024

What's up?

Sorry for lack of test case, but this should be pretty easy to reproduce:

I was trying to set up a check using buf breaking like this:

buf breaking image1.bin --against image2.bin --config buf.yaml

The image files were not generated by buf, they were generated by protoc -o

I tried using buf 1.32.2 with a config like:

version: v2
breaking:
  use:
    - WIRE

This did the breaking check using the default FILE level, the WIRE level was not respected. I also tried adding ignore settings that were not respected.

I downgraded to buf 1.6.0 and used the same command line with the same config except version: v1, and it respected the breaking settings as expected.

@doriable
Copy link
Member

I am unable to reproduce the error state. I built an example that fails FILE level checks but passes WIRE level checks, built images with protoc -o, and did not get any check failures with:

buf breaking image1.bin --against image2.bin --config buf.yaml

Could you please provide a repro of the problems you're running into?

@bufdev
Copy link
Member

bufdev commented Jun 14, 2024

Closing issue until reproduction is provided - we ask for repros as our team gets a lot of issues, and needs to be able to efficiently investigate them. If you can provide a reproduction, we will be happy to re-open!

@bufdev bufdev closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@dnr
Copy link
Author

dnr commented Jun 14, 2024

Fair enough, and thanks for trying!

I reduced my case to a minimal repro using buf 1.32.2 and just a v1 vs v2 config file, with binary images with a single renamed field:

https://github.com/dnr/buf-repro

$ ./run.sh
Buf version:
1.32.2

Correctly uses 'WIRE' rules (no output):

Uses rules besides 'WIRE':
temporal/server/api/clock/v1/message.proto:1:1:Field "1" with name "wll_clock" on message "HybridLogicalClock" changed option "json_name" from "wallClock" to "wllClock".
temporal/server/api/clock/v1/message.proto:1:1:Field "1" on message "HybridLogicalClock" changed name from "wall_clock" to "wll_clock".

(edit: oops, repo was marked private initially, changed to public now)

@dnr
Copy link
Author

dnr commented Jun 21, 2024

@doriable could you take another look, or let me know if I missed something obvious with the repro?

@doriable
Copy link
Member

This issue was resolved in the PR :) It will go out with the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants