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

Mismatched module digest #661

Closed
sashayakovtseva opened this issue Oct 14, 2021 · 4 comments
Closed

Mismatched module digest #661

sashayakovtseva opened this issue Oct 14, 2021 · 4 comments

Comments

@sashayakovtseva
Copy link

sashayakovtseva commented Oct 14, 2021

Hello!

I have buf.build/beta/googleapis in my dependencies, here is the buf.lock contents:

# Generated by buf. DO NOT EDIT.
deps:
  - remote: buf.build
    owner: beta
    repository: googleapis
    branch: main
    commit: ac0d624de3f746c3b8ef55c74b6f5244
    digest: b1-tcgu4ZoKWxrUlOynEGw-kV9iaOuDwRtJ4_17qAsU_RI=
    create_time: 2021-08-12T19:53:55.128813Z
  - remote: buf.build
    owner: beta
    repository: protoc-gen-validate
    branch: main
    commit: 82388a0a0cb04e98a203f95dfed5e84b
    digest: b1-lYgUMN58PxyCwvfQoopp40AJ-oHHjWXAzksF7v9U-U4=
    create_time: 2021-06-21T22:00:30.152545Z

From time to time, when I run buf build it updates googleapis digest to b1-tcgu4ZoKWxrUlOynEGw-kV9iaOuDwRtJ4_17qAsU_RI= and then fails with error:

Failed to "build": mismatched module digest for "buf.build/beta/googleapis": expected: "b1-GubXb4hZ56wTohZYDL-Muute9Jxx8J4TtIYucS30TBM=" got: "b1-tcgu4ZoKWxrUlOynEGw-kV9iaOuDwRtJ4_17qAsU_RI=".

Is there a way to fix this non deterministic behaviour? I can't quite understand, why sometimes it works fine and sometimes fails.

@amckinney
Copy link
Contributor

That's odd - is there any way that your buf.lock file is being hand-edited?

I was able to reproduce a buf.lock with the hash that the error recommends:

# Generated by buf. DO NOT EDIT.
version: v1
deps:
  - remote: buf.build
    owner: beta
    repository: googleapis
    branch: main
    commit: ac0d624de3f746c3b8ef55c74b6f5244
    digest: b1-GubXb4hZ56wTohZYDL-Muute9Jxx8J4TtIYucS30TBM=
    create_time: 2021-08-12T19:53:55.128813Z

What version of buf are you using?

@sashayakovtseva
Copy link
Author

That's odd - is there any way that your buf.lock file is being hand-edited?

nope.

I am using v0.41.0, possibly it is already outdated, will try to update.

@biotinker
Copy link

I had the exact same issue right down to the same digests mismatching, and updating buf from v0.40.0 to 1.0.0-rc5 fixed this for me.

@amckinney
Copy link
Contributor

Thanks, good to hear. We made some significant edits to buf during v0.44.0 and v0.45.0, so these changes must have slipped through - sorry for the inconvenience.

Marking as resolved for now.

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

No branches or pull requests

3 participants