Repository navigation
feat(bazel): use new rbe_autoconfig() and new container. #29336
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,3 +114,23 @@ sass_repositories() | |
| load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") | ||
|
|
||
| skydoc_repositories() | ||
|
|
||
| load("@bazel_toolchains//rules:environments.bzl", "clang_env") | ||
| load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") | ||
|
|
||
| rbe_autoconfig( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this part of RBE on-boarding now?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. |
||
| name = "rbe_ubuntu1604_angular", | ||
| # The sha256 of marketplace.gcr.io/google/rbe-ubuntu16-04 container that is | ||
| # used by rbe_autoconfig() to pair toolchain configs in the @bazel_toolchains repo. | ||
| base_container_digest = "sha256:677c1317f14c6fd5eba2fd8ec645bfdc5119f64b3e5e944e13c89e0525cc8ad1", | ||
| # Note that if you change the `digest`, you might also need to update the | ||
| # `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:<digest> | ||
| # and marketplace.gcr.io/google/rbe-ubuntu16-04:<base_container_digest> have | ||
| # the same Clang and JDK installed. | ||
| # Clang is needed because of the dependency on @com_google_protobuf. | ||
| # Java is needed for the Bazel's test executor Java tool. | ||
| digest = "sha256:74a8e9dca4781d5f277a7bd8e7ea7ed0f5906c79c9cd996205b6d32f090c62f3", | ||
| env = clang_env(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as discussed on chat, the dependency on clang is a bug and should be fixed. I'd rather fix it before landing a workaround since paying tech debt is a lot harder than not introducing it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tech debt and workaround is not introduced today or by this PR. The container that all current Angular's RBE builds use (gcr.io/asci-toolchain/nosla-ubuntu16_04-webtest) has Clang installed. Comparing to that container, this new container removed Go layer and few other debs that are not used by current Angular project, which is an improvement. And this container is being actively maintained and updated with new features and latest security patches. Regarding removing the Angular's dependency on protoc or Clang, we should either open a bug to Bazel team or Angular project's maintainer to fix it. After that is done, our team can test and hopefully remove Clang layer from this container. But I don't think that work should block merging this PR at all. |
||
| registry = "marketplace.gcr.io", | ||
| repository = "google/rbe-ubuntu16-04-webtest", | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Copyright 2016 The Bazel Authors. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # This .bazelrc file contains some of the flags required for the provided | ||
| # toolchain with Remote Build Execution. Specifically, it includes all flags | ||
| # except toolchain/platform flags. | ||
|
|
||
| # Depending on how many machines are in the remote execution instance, setting | ||
| # this higher can make builds faster by allowing more jobs to run in parallel. | ||
| # Setting it too high can result in jobs that timeout, however, while waiting | ||
| # for a remote machine to execute them. | ||
| build:remote --jobs=50 | ||
|
|
||
| # Set various strategies so that all actions execute remotely. Mixing remote | ||
| # and local execution will lead to errors unless the toolchain and remote | ||
| # machine exactly match the host machine. | ||
| build:remote --spawn_strategy=remote | ||
| build:remote --strategy=Javac=remote | ||
| build:remote --strategy=Closure=remote | ||
| build:remote --strategy=Genrule=remote | ||
| build:remote --define=EXECUTOR=remote | ||
|
|
||
| # Enable the remote cache so action results can be shared across machines, | ||
| # developers, and workspaces. | ||
| build:remote --remote_cache=remotebuildexecution.googleapis.com | ||
|
|
||
| # Enable remote execution so actions are performed on the remote systems. | ||
| build:remote --remote_executor=remotebuildexecution.googleapis.com | ||
|
|
||
| # Enable encryption. | ||
| build:remote --tls_enabled=true | ||
|
|
||
| # Set a higher timeout value, just in case. | ||
| build:remote --remote_timeout=3600 | ||
|
|
||
| # Enable authentication. This will pick up application default credentials by | ||
| # default. You can use --auth_credentials=some_file.json to use a service | ||
| # account credential instead. | ||
| build:remote --auth_enabled=true |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's your reasoning for removing the files from third_party?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are deprecating those bazelrc file per bazel version from bazel-toolchains repo. And the generic one will not work for this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still far too much configuration to ask users to copy-paste into their project to use remote build execution and will significantly hamper the story for Angular users who want to have this mostly managed for them. Could we schedule a quick chat with Geoffrey to discuss?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will schedule a meeting. +@nlopezgi who owns the new rbe_repo() rule.