Skip to content

build: use bazel automatic execution strategy selection #16823

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

Conversation

devversion
Copy link
Member

@devversion devversion commented Aug 20, 2019

Related to CI performance with Bazel: We currently get a lot of overhead for actions not running on remote as they cause runfile tree's to be created even though we don't need these (as test results are cached / or we just build). This seems like a bug/issue on the bazel-side: bazelbuild/bazel#6627

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 20, 2019
@devversion devversion changed the title Build/leverage new bazel automatic strategy selection build: use bazel automatic execution strategy selection Aug 20, 2019
* Switches our bazel setup to use the new bazel automatic strategy selection.
Currenlty all `ts_library`'s using the test tsconfig file are
not hermetic and will break when running remotely.

This is because just `tsconfig-test.json` is referenced as
action input while the tsconfig actually extends from the
`tsconfig-build.json`.
@devversion devversion force-pushed the build/leverage-new-bazel-automatic-strategy-selection branch from d076715 to 1663383 Compare August 20, 2019 09:28
@devversion devversion force-pushed the build/leverage-new-bazel-automatic-strategy-selection branch from d8bd402 to 1663383 Compare August 20, 2019 09:50
@devversion devversion marked this pull request as ready for review August 20, 2019 09:53
@devversion devversion requested a review from jelbourn as a code owner August 20, 2019 09:53
@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Aug 20, 2019
@buchgr
Copy link

buchgr commented Aug 20, 2019

@devversion it is an issue on the Bazel side. I am trying to understand the priority of this issue. Can you quantify the overhead?

@devversion
Copy link
Member Author

devversion commented Aug 20, 2019

@buchgr This PR was originally just changing some things on the execution strategy, but I also spent some time looking into CI performance with Bazel. Apparently some of the jobs we have, always seem to build the runfile trees even though they are not needed/the test results are cached.

Your thoughts on the bazel issue seemed to confirm my thoughts that the situation could be improved on the bazel side by not building the runfile trees in remote, or if results are cached.

If you for example look at a CI job where nothing really changed any action input, Bazel still seems to build the runfile trees: https://circleci.com/gh/angular/components/72208. Since we have a lot of test targets (~46) it seems like a lot of unnecessary runfile tree's are created. Preferably since nothing changed, the CI job should run as a noop.

I'm not sure if I can give any specific numbers (yet), but it looks like it definitely takes up some time. Especially in the Bazel & NodeJS story where actions require a lot of runfiles (causing a lot of files to be transferred/symlinked). Happy to chat more about this if you think it's helpful.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Aug 20, 2019
@jelbourn jelbourn merged commit c05d57f into angular:master Aug 20, 2019
andrewseguin pushed a commit that referenced this pull request Aug 26, 2019
Currenlty all `ts_library`'s using the test tsconfig file are
not hermetic and will break when running remotely.

This is because just `tsconfig-test.json` is referenced as
action input while the tsconfig actually extends from the
`tsconfig-build.json`.

(cherry picked from commit c05d57f)
@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 20, 2019
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 cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants