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

Fix b5 digest calculation for remote modules #3190

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

saquibmian
Copy link
Contributor

@saquibmian saquibmian commented Jul 25, 2024

See the comment in added_module.go for details.

See the comment in `added_module.go` for details.

A minimal repro can be found [here](TODO).
Copy link
Contributor

github-actions bot commented Jul 25, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 7, 2024, 8:10 PM

@saquibmian saquibmian marked this pull request as ready for review July 25, 2024 16:48
Copy link
Member

@pkwarren pkwarren left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Good catch and thanks for updating the comments.

Copy link
Member

@bufdev bufdev left a comment

Choose a reason for hiding this comment

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

I'm extremely uncomfortable with this solution, and it's going to require some deep in-person conversations to resolve. Overall concerns:

  • For remote modules, we're just completely bypassing any local calculation of what the digest is, based on how we expect digests to be calculated, and relying on the remote calculation. This feels subtly iffy in a few ways.
  • I'm not confident that tamper-proofing will actually occur after this is done - I would need to spend more time on this, but while it "happens at the ModuleData" level, I don't understand why we can effecvtively do the old calculation method at the ModuleData level with no issue, but we need to do this bypass at the Module level.

With more time, I could parse this out, but it's not clear to me, and I'm concerned that this is going to introduce a nasty long-term bug. Let's talk about this next week.

@bufdev bufdev changed the title Fix b5 digest calculation for remote modules PAUSED: Fix b5 digest calculation for remote modules Aug 21, 2024
@bufdev bufdev changed the title PAUSED: Fix b5 digest calculation for remote modules Fix b5 digest calculation for remote modules Aug 21, 2024
@bufdev bufdev added the Paused label Aug 21, 2024
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.

3 participants