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

Move BES upload check earlier, to prevent calling FindMissingBlobs #16999

Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ private boolean shouldQuery(PathMetadata path) {
}

private boolean shouldUpload(PathMetadata path) {
boolean result =
path.getDigest() != null && !path.isRemote() && !path.isDirectory() && !path.isOmitted();
return path.getDigest() != null && !path.isRemote() && !path.isDirectory() && !path.isOmitted();
}

private boolean shouldUploadBasedOnUploadMode(PathMetadata path) {
if (remoteBuildEventUploadMode == RemoteBuildEventUploadMode.MINIMAL) {
result = result && (isTestLog(path) || isProfile(path));
return isTestLog(path) || isProfile(path);
}

return result;
return true;
}

private boolean isTestLog(PathMetadata path) {
Expand All @@ -236,7 +237,9 @@ private Single<List<PathMetadata>> queryRemoteCache(
List<PathMetadata> filesToQuery = new ArrayList<>();
Set<Digest> digestsToQuery = new HashSet<>();
for (PathMetadata path : paths) {
if (shouldQuery(path)) {
if (!shouldUploadBasedOnUploadMode(path)) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move this check into shouldQuery. Tests are failing because we didn't add path into knownRemotePaths below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I didn't put it into shouldQuery, was because the path might not be remote. So not sure on the answer to this.

continue;
} else if (shouldQuery(path)) {
filesToQuery.add(path);
digestsToQuery.add(path.getDigest());
} else {
Expand Down