-
Notifications
You must be signed in to change notification settings - Fork 4.2k
--bes_upload_mode=fully_async causes local BEP files to be written async too #10438
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
Comments
What's the latest status on this? We parse the BEP as part of CI, but we want to use |
That is an excellent question for @coeuvre! 😄 |
What is the expected behavior in this case? It seems to me that having local BEP files written completely before exiting Bazel contradicts to |
The events that are generated that populate the BEP can be written to disk a lot faster than uploading them to BES. The desire is for For our use case, we upload the BEP in Buildkite, or do post-build logic based on what is in the BEP, but we are fine if BES continues to upload in the background. |
I was thinking the case that, even we can write BEP to disk a lot faster, we still have to wait for local files be uploaded to remote server in order to get the converted URI (we can't get that ahead of time). So if we want to have local BEP files written completely before exiting Bazel, we have to wait for the file uploads. |
We could probably make the URI in the local BEP files pointing to local files instead so there is no network traffic for generating local BEP files and can be blocked waiting after the build regardless |
We would actually like that as an option 😍. BEP having local URI and BES having remote cache URI. |
Hi @coeuvre, just a ping on this after a couple months. |
IIUC, |
That seems to work. As far as I can tell the BEP file is fully written to disk after the |
Do you mean even with By looking at the code, I think it should be completed written before |
No, I meant that with |
@philwo Do we have action items on Bazel CI (or other places) to address this issue? Otherwise we can close this. |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
When using
--bes_upload_mode=fully_async
, Bazel uploads BES asynchronously, so yourbazel build
command can exit, but the upload still continues in the background. This is nice for performance.However, it seems to also cause local BEP files, e.g.
--build_event_text_file
or--build_event_json_file
to be written asynchronously. This means that if youbazel build
and save the BEP to a file, then immediately inspect the BEP, it might not be fully written yet.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The
grep
then often doesn't return anything, because the targets_configured thing is written at the end of the BEP file. If you add asleep 3
before it, it usually works.What operating system are you running Bazel on?
Linux
What's the output of
bazel info release
?release 1.2.1
The text was updated successfully, but these errors were encountered: