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

Remote: Update BEP uploader to use RemoteCache and more robust to upload errors #13959

Closed
wants to merge 1 commit into from

Conversation

coeuvre
Copy link
Member

@coeuvre coeuvre commented Sep 9, 2021

Local files referenced by build events are uploaded to remote cache with ByteStreamBuildEventArtifactUploader which uses ByteStreamUploader and MissingDigestsFinder internally.

This PR changes ByteStreamBuildEventArtifactUploader to use RemoteCache directly in order to benefit from recently improvements to RemoteCache.

Upload error that used to crash Bazel or cause a non-zero exit code is now caught and reported.

Fixes #13920.

Related #11473.

@google-cla google-cla bot added the cla: yes label Sep 9, 2021
@coeuvre coeuvre requested a review from philwo September 9, 2021 06:49
@@ -619,6 +616,16 @@ public void beforeCommand(CommandEnvironment env) throws AbruptExitException {
executorService, env, remoteCache, retryScheduler, digestUtil);
}

buildEventArtifactUploaderFactoryDelegate.init(
Copy link
Member

Choose a reason for hiding this comment

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

Should we use a buildEventArtifactUploaderFactoryDelegateAdapterFacade.init() here instead? (just kidding ;))

Copy link
Member

@philwo philwo left a comment

Choose a reason for hiding this comment

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

Thanks!!

@gregestren gregestren added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Sep 9, 2021
@brentleyjones
Copy link
Contributor

Does this mean BES uploading will respect no-remote-cache/no-remote/no-cache flags when using --experimental_build_event_upload_strategy=remote?

@coeuvre
Copy link
Member Author

coeuvre commented Sep 14, 2021

Not yet. I will create another PR for that.

@finecci
Copy link

finecci commented Jan 11, 2022

Would this commit merged into bazel-4.x version?

@coeuvre
Copy link
Member Author

coeuvre commented Jan 11, 2022

Unfortunately no since this commit is based on many other improvement we made for remote execution after 4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bazel crashed when BES connection is aborted with remote cache enabled
5 participants