Skip to content

Comments

Make SpliceBlobRequest.blob_digest mandatory#356

Merged
tjgq merged 2 commits intobazelbuild:mainfrom
tyler-french:require-splice-digest
Jan 13, 2026
Merged

Make SpliceBlobRequest.blob_digest mandatory#356
tjgq merged 2 commits intobazelbuild:mainfrom
tyler-french:require-splice-digest

Conversation

@tyler-french
Copy link
Contributor

For reasons listed in the API, this field should be required

Copy link
Collaborator

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

cc: @roloffs @aehlig for the JustBuild side since this is technically a breaking change, but we have yet to do a tag release so it should be ok-ish for consideration.

As explained in the other PR, I think SHOULD is still ok here as we do want to give the client the benefit of not having to hash the whole large blob when they don't want to.

Realistically, though, the client should almost always want to hash the large blob to use that hash in FindMissing before chunking that blob for uploads. That could potentially save it a lot of network traffic. So I don't mind too much if we go for a stricter route either.

  1. If chunking information already exists for the blob, it allows
    the server to keep or replace with new chunking information.

how is this OR decided?

@tyler-french
Copy link
Contributor Author

7. If chunking information already exists for the blob, it allows
the server to keep or replace with new chunking information.

how is this OR decided?

@sluongng I think the server should be at liberty to decide whether to keep the previous entry, or replace it. There is a risk of a faulty client poisoning or maliciously populating these.

@sluongng
Copy link
Collaborator

I think the server should be at liberty to decide whether to keep the previous entry, or replace it. There is a risk of a faulty client poisoning or maliciously populating these.

Agree.

a. Do you think we should add this to the spec to specifically call out that the server MAY decide to keep the previous entry.

b. Are the clients interested in the result of this decision? I.e., if the client tried to splice SetA into BigBlob, but the server decided to keep SetB, should we give the client a signal so that they can choose to download and use SetB locally instead?

@tyler-french
Copy link
Contributor Author

b. Are the clients interested in the result of this decision? I.e., if the client tried to splice SetA into BigBlob, but the server decided to keep SetB, should we give the client a signal so that they can choose to download and use SetB locally instead?

What if the server responds with ALREADY_EXISTS if the server chooses to discard SetA, and then the client can call Split() to get SetB if they really need it.

@aehlig
Copy link

aehlig commented Dec 20, 2025

cc: @roloffs @aehlig for the JustBuild side since this is technically a breaking change, but we have yet to do a tag release so it should be ok-ish for consideration.

Thanks for letting us know. Currently JustBuild always sets the digest, so is not broken by that breaking change.

Copilot AI review requested due to automatic review settings December 21, 2025 03:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the blob_digest field required in the SpliceBlobRequest message by changing the client requirement from "SHOULD" to "MUST" and documenting additional reasons for this requirement.

Key Changes:

  • Updated documentation to require (MUST vs SHOULD) that clients set the blob_digest field
  • Enhanced reason #1 to clarify that early existence checks apply to both the blob and existing chunks
  • Added reason #3 explaining how the field enables servers to manage chunking information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tyler-french
Copy link
Contributor Author

cc @EdSchouten @roloffs @mostynb I see you were involved in #282 #337, if you have time to review: hoping to get consensus on this.

@tyler-french tyler-french requested a review from tjgq January 13, 2026 15:59
@tjgq tjgq changed the title SpliceBlobRequest.blob_digest should be required Make SpliceBlobRequest.blob_digest mandatory Jan 13, 2026
@tjgq
Copy link
Collaborator

tjgq commented Jan 13, 2026

cc @EdSchouten @roloffs @mostynb I see you were involved in #282 #337, if you have time to review: hoping to get consensus on this.

For future reference: we reached consensus to submit this at the working group meeting, and will reevaluate potential use cases that need an optional digest once we have more experience with client/server implementations (it's easier to start out stricter and loosen it later than the other way around).

@tjgq tjgq merged commit 016806f into bazelbuild:main Jan 13, 2026
1 check passed
@tyler-french tyler-french deleted the require-splice-digest branch January 13, 2026 18:53
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.

5 participants