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

Support digest_function in GrpcStore #1325

Open
bclark8923 opened this issue Sep 5, 2024 · 3 comments
Open

Support digest_function in GrpcStore #1325

bclark8923 opened this issue Sep 5, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bclark8923
Copy link
Member

When using an alternative hash function to the default (sha256), GRPC store doesn't receive which hash function to use.

@bclark8923 bclark8923 added bug Something isn't working good first issue Good for newcomers labels Sep 5, 2024
@bclark8923 bclark8923 changed the title Support digest_function in GRPC Store Support digest_function in GrpcStore Sep 6, 2024
@MarcusSorealheis
Copy link
Collaborator

If you are looking to solve this issue, look into resource_info.rs. It predates our support
for Blake3.

@aleksdmladenovic
Copy link
Contributor

I will work on this issue. cc: @MarcusSorealheis, @allada, @bclark8923.

@aleksdmladenovic
Copy link
Contributor

Hi, @bclark8923.

I looked over details of this issue and I have some things unclear about this issue.

FYI, from this PR, we now detect digest function automatically from the request.

And there is code for GrpcStore receiving digest_function from ActiveOriginContext in grpc_store.rs.

digest_function: ActiveOriginContext::get_value(&ACTIVE_HASHER_FUNC)
.err_tip(|| "In get_action_from_store")?
.map_or_else(default_digest_hasher_func, |v| *v)
.proto_digest_func()
.into(),

digest_function: ActiveOriginContext::get_value(&ACTIVE_HASHER_FUNC)
.err_tip(|| "In get_action_from_store")?
.map_or_else(default_digest_hasher_func, |v| *v)
.proto_digest_func()
.into(),

digest_function: ActiveOriginContext::get_value(&ACTIVE_HASHER_FUNC)
.err_tip(|| "In GrpcStore::has_with_results")?
.map_or_else(default_digest_hasher_func, |v| *v)
.proto_digest_func()
.into(),

And just fyi, while I was trying to evaluate this issue, I found out that there were no test files for testing GrpcStore feature.

Did we omit this for specific purpose or just missing and need to be added later?

And I hope you to make it clear how you caught this issue and how you tested.

Thanks.

cc: @allada, @MarcusSorealheis

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

No branches or pull requests

3 participants