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

[7.4.1] Fix double encoding of inputs in worker request #24123

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/com/google/devtools/build/lib/worker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/exec/local",
"//src/main/java/com/google/devtools/build/lib/profiler",
"//src/main/java/com/google/devtools/build/lib/sandbox:sandbox_helpers",
"//src/main/java/com/google/devtools/build/lib/util:string",
"//src/main/java/com/google/devtools/build/lib/util/io",
"//src/main/java/com/google/devtools/build/lib/vfs",
"//src/main/java/com/google/devtools/build/lib/vfs:pathfragment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.google.devtools.build.lib.worker;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.devtools.build.lib.util.StringUtil.reencodeInternalToExternal;
meteorcloudy marked this conversation as resolved.
Show resolved Hide resolved
import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.base.Stopwatch;
Expand Down Expand Up @@ -262,7 +263,10 @@ private WorkRequest createWorkRequest(
digest = ByteString.copyFromUtf8(HashCode.fromBytes(digestBytes).toString());
}

requestBuilder.addInputsBuilder().setPath(input.getExecPathString()).setDigest(digest);
requestBuilder
.addInputsBuilder()
.setPath(reencodeInternalToExternal(input.getExecPathString()))
meteorcloudy marked this conversation as resolved.
Show resolved Hide resolved
.setDigest(digest);
}
if (workerOptions.workerVerbose) {
requestBuilder.setVerbosity(VERBOSE_LEVEL);
Expand Down