[go: nahoru, domu]

Skip to content
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

Enable RBE by default #55400

Closed
sigurdm opened this issue Apr 8, 2024 · 2 comments
Closed

Enable RBE by default #55400

sigurdm opened this issue Apr 8, 2024 · 2 comments
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). type-enhancement A request for a change that isn't a bug

Comments

@sigurdm
Copy link
Contributor
sigurdm commented Apr 8, 2024

Is there any reason why RBE is not enabled by default when available?

I appreciate the "This build could be faster" message, but if we already detect that it could be faster, why not just make it so?

@lrhn lrhn added type-enhancement A request for a change that isn't a bug area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). labels Apr 8, 2024
@sigurdm
Copy link
Contributor Author
sigurdm commented Apr 18, 2024

After discussing with @sortie this is not that easy, and would incur an overhead. We have a warning - I guess that is good enough

@sigurdm sigurdm closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@sortie
Copy link
Contributor
sortie commented Apr 18, 2024

Thanks for asking, I put a lot of thought into the choice of defaults to keep the experience useful, simple, and fast. :)

The problem is that RBE needs two things:

  1. You must be a googler on an appropriate team.
  2. You must have gcloud application default credentials.

I can appropriate the Googler check fairly well if inexactly, which is what we use to produce the warning if no RBE choice is detected.

However, the credentials cannot be obtained automatically. The command would have to spawn an oauth workflow where you have to enter your password and it's a security anti-pattern to just launch a browser that asks you to enter your password for vague reasons you did not personally intend. Additionally running the gcloud command to check if the credentials already exists takes about 900 ms on my machine and I don't want to add that overhead to all build.py invocations, plus complicate the script even more when it could be really simple. This check would disproportionally slow down small incremental builds which need to be the fastest.

The question then is, should the build fail if an internal developer runs a build without credentials and no explicit opinion on RBE? I say no, because rudely failing it feels inconvenient and non-useful, because the developer expressed intent for what they want and we can give it to them (by building locally). A warning that it could be faster feels appropriate for this situation since there is no error blocking a local build.

Additionally RBE does not work for external developers. Goma was on by default which gave a much worse experience for our friends in the open source community where every guide had to mention --no-goma and they had to remember to use it. Now, everyone can use the same commands to get the same builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants