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

Conversation

kormide
Copy link
Contributor

@kormide kormide commented Aug 24, 2022

@devversion I think this is the source of cache misses I'm seeing in angular/angular#47161. In unsandboxed execution (which is the case for targets run under RBE, right?) chromium will write to this log file each run in under the external dir causing remote cache misses on successive builds.

Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@kormide
Copy link
Contributor Author

kormide commented Aug 24, 2022

As a potential workaround, in my protractor config file I tried passing the flags --disable-logging and --disable-and-delete-previous-log however they had no effect. Perhaps those flags don't work on the current version of chromium supported.

Passing --log-level=3 helped to keep this file empty, but it still gets created when it doesn't exist after a fresh bazel run..

@josephperrott josephperrott added the action: merge The PR is ready for merge by the caretaker label Aug 24, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Aug 24, 2022

This PR was merged into the repository by commit 7af5d34.

@angular-robot angular-robot bot closed this in 7af5d34 Aug 24, 2022
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.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants