-
Notifications
You must be signed in to change notification settings - Fork 202
Initial implementation of remote persistent workers #1922
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
Open
MarcusSorealheis
wants to merge
8
commits into
TraceMachina:main
Choose a base branch
from
MarcusSorealheis:remote-persistent-workers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
86ec7cc
Initial implementation of remote persistent workers
MarcusSorealheis 81f6d9c
Merge branch 'main' into remote-persistent-workers
MarcusSorealheis afee1ff
Fix pre-commit formatting issues
MarcusSorealheis 80c64f2
Fix additional pre-commit clippy flags
MarcusSorealheis 90ff13d
fix bazelrc
MarcusSorealheis c35b3c2
Fix pre-commit issues
MarcusSorealheis 2630ee1
Fix critical bug: restore tracing-test dependency
MarcusSorealheis 899a788
fixed the github actions
MarcusSorealheis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module( | ||
| name = "nativelink", | ||
| version = "0.7.5", | ||
| version = "0.7.1", | ||
| compatibility_level = 0, | ||
| ) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # Copyright 2025 The NativeLink Authors. All rights reserved. | ||
| # | ||
| # Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # See LICENSE file for details | ||
| # | ||
| # 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. | ||
|
|
||
| # Bazel configuration for using NativeLink with Remote Persistent Workers | ||
| # This configuration is optimized for JVM-based projects (Java, Scala, Kotlin) | ||
| # and large TypeScript/JavaScript projects | ||
|
|
||
| # Remote execution configuration | ||
| build --remote_executor=grpc://localhost:50051 | ||
| build --remote_cache=grpc://localhost:50051 | ||
|
|
||
| # Enable remote persistent workers | ||
| build --experimental_remote_mark_tool_inputs | ||
| build --experimental_remote_persistent_workers | ||
|
|
||
| # Instance name for the remote execution service | ||
| build --remote_instance_name=main | ||
|
|
||
| # Default remote execution properties | ||
| build --remote_default_exec_properties=OSFamily=linux | ||
| build --remote_default_exec_properties=cpu_count=4 | ||
|
|
||
| # Java/Scala persistent worker configuration | ||
| build:java --strategy=Javac=remote | ||
| build:java --strategy=JavaIjar=remote | ||
| build:java --strategy=JavaDeployJar=remote | ||
| build:java --strategy=JavaSourceJar=remote | ||
| build:java --remote_default_exec_properties=persistentWorkerTool=javac | ||
| build:java --worker_extra_flag=Javac=--persistent_worker | ||
| build:java --worker_max_instances=Javac=5 | ||
| build:java --worker_quit_after_build=false | ||
|
|
||
| # Scala persistent worker configuration | ||
| build:scala --strategy=Scalac=remote | ||
| build:scala --remote_default_exec_properties=persistentWorkerTool=scalac | ||
| build:scala --worker_extra_flag=Scalac=--persistent_worker | ||
| build:scala --worker_max_instances=Scalac=3 | ||
| build:scala --worker_quit_after_build=false | ||
|
|
||
| # Kotlin persistent worker configuration | ||
| build:kotlin --strategy=KotlinCompile=remote | ||
| build:kotlin --remote_default_exec_properties=persistentWorkerTool=kotlinc | ||
| build:kotlin --worker_extra_flag=KotlinCompile=--persistent_worker | ||
| build:kotlin --worker_max_instances=KotlinCompile=3 | ||
| build:kotlin --worker_quit_after_build=false | ||
|
|
||
| # TypeScript persistent worker configuration | ||
| build:typescript --strategy=TypeScriptCompile=remote | ||
| build:typescript --remote_default_exec_properties=persistentWorkerTool=tsc | ||
| build:typescript --worker_extra_flag=TypeScriptCompile=--persistent_worker | ||
| build:typescript --worker_max_instances=TypeScriptCompile=5 | ||
| build:typescript --worker_quit_after_build=false | ||
|
|
||
| # Webpack bundling with persistent workers | ||
| build:webpack --strategy=WebpackBundle=remote | ||
| build:webpack --remote_default_exec_properties=persistentWorkerTool=webpack | ||
| build:webpack --worker_extra_flag=WebpackBundle=--persistent_worker | ||
| build:webpack --worker_max_instances=WebpackBundle=2 | ||
| build:webpack --worker_quit_after_build=false | ||
|
|
||
| # General persistent worker settings | ||
| build --worker_verbose | ||
| build --worker_sandboxing=false # Persistent workers don't support sandboxing | ||
| build --worker_multiplex_sandboxing=false | ||
| build --experimental_worker_strict_flagfiles | ||
| build --experimental_worker_for_repo_fetching=off | ||
|
|
||
| # Memory management for JVM workers | ||
| build --worker_extra_flag=Javac=-J-Xmx2g | ||
| build --worker_extra_flag=Scalac=-J-Xmx4g | ||
| build --worker_extra_flag=KotlinCompile=-J-Xmx2g | ||
|
|
||
| # Performance optimizations | ||
| build --jobs=100 | ||
| build --remote_download_minimal | ||
| build --experimental_remote_cache_compression | ||
| build --experimental_remote_cache_async | ||
| build --remote_timeout=3600 | ||
|
|
||
| # Debugging persistent workers (uncomment when needed) | ||
| # build --worker_verbose | ||
| # build --sandbox_debug | ||
| # build --verbose_failures | ||
| # build --subcommands=pretty_print | ||
|
|
||
| # Platform-specific configurations | ||
| build:linux --remote_default_exec_properties=OSFamily=linux | ||
| build:linux --remote_default_exec_properties=container-image=docker://gcr.io/nativelink/ubuntu-22.04-java17 | ||
|
|
||
| build:macos --remote_default_exec_properties=OSFamily=darwin | ||
| build:macos --remote_default_exec_properties=arch=x86_64 | ||
|
|
||
| build:windows --remote_default_exec_properties=OSFamily=windows | ||
| build:windows --remote_default_exec_properties=arch=x64 | ||
|
|
||
| # CI configuration with persistent workers | ||
| build:ci --config=java | ||
| build:ci --config=remote | ||
| build:ci --remote_upload_local_results=true | ||
| build:ci --remote_timeout=3600 | ||
| build:ci --worker_quit_after_build=true # Clean up workers after CI build | ||
|
|
||
| # Development configuration | ||
| build:dev --config=java | ||
| build:dev --worker_quit_after_build=false | ||
| build:dev --worker_max_instances=10 | ||
| build:dev --remote_download_outputs=toplevel |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This and various other config files appear to have been reset to ~0.7.1 era (given the versions) and they remove a bunch of fixes I've done in that time. Possibly merge issues?
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.
Yes, that's correct. Let me try to get this fixed.