-
Notifications
You must be signed in to change notification settings - Fork 522
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
ts_devserver launcher template is platform specific #1409
Comments
This is similar to the problem nodejs_binary had with cross-platform RBE in its launcher template. The fix is to choose the executable at runtime in the launcher script. |
How about marking this template action as local? It's silly to get a remote worker to do the file io and interpolation |
In the case that you want to build & test remotely then it can't be marked local. |
…rib#1409 This change allows a ts_devserver target to be build with cross platform RBE (host platform is osx or Windows & execution platform is linux) and still run on the host platform. With cross-platform RBE for OSX & Windows ctx.executable.devserver will be linux as --cpu and --host_cpu must be overridden to k8. However, we still want to be able to run the devserver on the host machine so we need to include the host devserver binary, which is ctx.executable.devserver_host, in the runfiles. For non-RBE and for RBE with a linux host, ctx.executable.devserver & ctx.executable.devserver_host will be the same binary.
Note. To reproduce this |
I don't think ts_devserver needs to support build&test remotely, it's meant to be a local devserver |
Its already supported as you can build & run a ts_devserver target on RBE as part of a protractor_web_test. In the angular repo, ts_devserver is used quite extensively with protractor_web_test as the Where the angular team is running into issues is with cross-platform RBE:
This is telling bazel to still use RBE for the build but to then run the The developer flow that gets you here is that some
then everything is built on RBE and the resulting target is run locally as desired. However right now, the ts_devserver launcher script is hard-coded to run the linux devserver binary as the launcher script template action is run on RBE. Note: this looks odd with the Without A developer could run
instead and turn off remote execution but that would force them to rebuild the entire repository to debug the failing test as the cache from As this is a fairly common workflow for angular devs I think we should support it in the current hacky RBE state. If the |
This change allows a ts_devserver target to be build with cross platform RBE (host platform is osx or Windows & execution platform is linux) and still run on the host platform. With cross-platform RBE for OSX & Windows ctx.executable.devserver will be linux as --cpu and --host_cpu must be overridden to k8. However, we still want to be able to run the devserver on the host machine so we need to include the host devserver binary, which is ctx.executable.devserver_host, in the runfiles. For non-RBE and for RBE with a linux host, ctx.executable.devserver & ctx.executable.devserver_host will be the same binary. Issue for re-visiting this in the future is: Revisit cross-platform RBE mechanics #1415
This release brings two bug fixes we're waiting on: 1) fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (bazel-contrib/rules_nodejs#1402), which is a pre-req for angular#34112 2) fix(typescript): fix for cross platform ts_devserver issue angular#1409 (bazel-contrib/rules_nodejs#1413) which resolves ts_devserver launcher template is platform specific angular#1409 (bazel-contrib/rules_nodejs#1409) --- this fixes an OSX developer workflow with --config=remote This does not upgrade integration/bazel or integation/schematics. That will be done in another PR.
This release brings two bug fixes we're waiting on: 1) fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (bazel-contrib/rules_nodejs#1402), which is a pre-req for #34112 2) fix(typescript): fix for cross platform ts_devserver issue #1409 (bazel-contrib/rules_nodejs#1413) which resolves ts_devserver launcher template is platform specific #1409 (bazel-contrib/rules_nodejs#1409) --- this fixes an OSX developer workflow with --config=remote This does not upgrade integration/bazel or integation/schematics. That will be done in another PR. PR Close #34243
This release brings two bug fixes we're waiting on: 1) fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (bazel-contrib/rules_nodejs#1402), which is a pre-req for #34112 2) fix(typescript): fix for cross platform ts_devserver issue #1409 (bazel-contrib/rules_nodejs#1413) which resolves ts_devserver launcher template is platform specific #1409 (bazel-contrib/rules_nodejs#1409) --- this fixes an OSX developer workflow with --config=remote This does not upgrade integration/bazel or integation/schematics. That will be done in another PR. PR Close #34243
This release brings two bug fixes we're waiting on: 1) fix(builtin): additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (bazel-contrib/rules_nodejs#1402), which is a pre-req for angular#34112 2) fix(typescript): fix for cross platform ts_devserver issue angular#1409 (bazel-contrib/rules_nodejs#1413) which resolves ts_devserver launcher template is platform specific angular#1409 (bazel-contrib/rules_nodejs#1409) --- this fixes an OSX developer workflow with --config=remote This does not upgrade integration/bazel or integation/schematics. That will be done in another PR. PR Close angular#34243
where
if build on linux RBE and then the target is run locally on OSX or Windows it will fail with:
The text was updated successfully, but these errors were encountered: