Skip to content

fix(bazel/browsers): exclude a log file that chromium writes to on linux causing cache misses #795

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

Closed
wants to merge 1 commit into from
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
5 changes: 5 additions & 0 deletions bazel/browsers/chromium/chromium.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def define_chromium_repositories():
named_files = {
"CHROMIUM": "chrome-linux/chrome",
},
exclude_patterns = [
# Exclude a log file that chromium writes to each run, causing remote cache
# misses in downstream targets.
"chrome-linux/chrome_debug.log",
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a similar thing for e.g. Mac or Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. I'll test both and report back.

Copy link
Contributor Author

@kormide kormide Aug 24, 2022

Choose a reason for hiding this comment

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

@devversion It doesn't appear to cause cache misses on Windows.

On OSX, I can't determine due to other issues. Using bazel-provided chromium in unsandboxed execution fails early because it can't build runfiles due to all of the files with spaces in them. If I exclude all of those files, then the runfiles can be built but chromium fails, probably because it needs some of those files.

It's not clear to me why it works with sandboxed execution on OSX but fails when run outside of the sandbox. My understanding was that using --nobuild_runfile_links fixed the runfiles with spaces issue but that doesn't seem to work for unsandboxed execution.

],
)

browser_archive(
Expand Down