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

Work with RBE and --experimental_allow_unresolved_symlinks enabled once Bazel supports it #308

Closed
gregmagolan opened this issue Jul 26, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@gregmagolan
Copy link
Member

gregmagolan commented Jul 26, 2022

With #283 landed, rules_js will now use the ctx.actions.declare_symlink API to create all of the symlinks in the symlinks node_modules tree if the --experimental_allow_unresolved_symlinks flag is set.

This feature is not yet stable in Bazel (see bazelbuild/bazel#10298) and is currently being stabilized by @fmeum split across multiple PRs to bazel such as bazelbuild/bazel#15963.

This can slip the 1.0 milestone since it depends on when things land in Bazel. It is here for now for visibility on the roadmap for users.

@gregmagolan gregmagolan added the enhancement New feature or request label Jul 26, 2022
@gregmagolan gregmagolan added this to the 1.0 milestone Jul 26, 2022
@gregmagolan gregmagolan changed the title Add CI with RBE and --experimental_allow_unresolved_symlinks enabled once Bazel supports Add CI with RBE and --experimental_allow_unresolved_symlinks enabled once Bazel supports it Jul 26, 2022
@gregmagolan gregmagolan modified the milestones: 1.0, 1.1 Aug 3, 2022
@mrmeku
Copy link
Contributor

mrmeku commented Aug 9, 2022

With the 5.3.0 release candidate is this fixed? @gregmagolan

https://groups.google.com/g/bazel-discuss/c/CTrwcVMov0k

@gregmagolan
Copy link
Member Author

It will not. It looks like 6.0 is where they will land. Relevant issue to follow the progress is this one bazelbuild/bazel#10298.

@alexeagle alexeagle changed the title Add CI with RBE and --experimental_allow_unresolved_symlinks enabled once Bazel supports it Work with RBE and --experimental_allow_unresolved_symlinks enabled once Bazel supports it Aug 22, 2022
@alexeagle
Copy link
Member

With bazelbuild/bazel#15781 landed today, we think
the only remaining issue with Bazel at HEAD preventing rules_js on RBE is bazelbuild/bazel#14224

@alexeagle
Copy link
Member

alexeagle commented Aug 24, 2022

#400 shows that rules_js is now working with RBE at HEAD!

However it requires one change to Bazel which is on this fork: https://github.com/aspect-build/bazel/releases/tag/6.0.0-aspect1

https://github.com/aspect-build/rules_js/blob/main/.github/workflows/ci.yaml#L56 shows where we select our fork for RBE builds on CI.

@alexeagle
Copy link
Member

For anyone who wants to try RBE with rules_js or rules_ts now, here are the steps:

  1. Decide where you want to enable this. Since there is no release of Bazel which has all the needed fixes (as of this writing) you'll need to use a fork of Bazel. You have to decide if you're okay with the risk of updating your "production" Bazel version that all developers use, or maybe try this out only on a branch, or maybe use the newer Bazel only on CI and not for local development.
  2. Use our fork: https://github.com/aspect-build/bazel/releases/tag/6.0.0-aspect1 which currently supports only Linux x86 and MacOS on x86 or Apple Silicon. Use the usual configuration affordances in https://github.com/bazelbuild/bazelisk - for example put USE_BAZEL_VERSION=aspect-build/6.0.0-aspect1 in the environment where bazelisk runs, or put aspect-build/6.0.0-aspect1 in your .bazelversion file
  3. Use the newest rules_js release, as we're still making fixes.
  4. Pass the --experimental_allow_unresolved_symlinks flag to Bazel when running with RBE.
  5. Turn on RBE using Bazel's flags. See https://bazel.build/remote/rbe

@alexeagle
Copy link
Member

bazelbuild/bazel#16272 is the PR we expect will fully resolve this, and should make it into Bazel 6.0 :)

@gregmagolan
Copy link
Member Author

bazelbuild/bazel#16272 is landed on master bazelbuild/bazel@d834905

@gregmagolan
Copy link
Member Author

Latest rules_js works with Bazel 6.0.0rc2 with RBE. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants