-
Notifications
You must be signed in to change notification settings - Fork 281
Add remote persistent worker support #787
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
Closed
Closed
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
6550bdc
Add example for remote persistent workers
aherrmann 17ac18a
Implement support for remote persistent workers
aherrmann 9730b29
Fix clippy error
aherrmann 9e0b232
fix run_display test
aherrmann 58d4a22
Use WorkerRunInfo.exe for non-worker mode
aherrmann 1bd5a94
Use WorkerRunInfo.worker for remote persistent worker
aherrmann 2c032c9
Document the worker protocol in the example
aherrmann 4a3e31e
Create proto_python_library rule
aherrmann f659e43
Hermetic Python toolchain and Buck2 installed packages
aherrmann bd8b6d7
Use proto_python_library rule
aherrmann 6f0ce5e
Standard BuildBuddy worker image
aherrmann a8ad96f
Remove the Nix flake
aherrmann 1e9787a
Update the README and direnv configuration
aherrmann 1eebd7d
Shrink number of test targets
aherrmann 16b31c4
fix README instructions
aherrmann 8e900f2
Add an automated test script
aherrmann 1977ac2
Test persistent worker example on CI
aherrmann f1fd231
fix typo
aherrmann 34f7ade
Remove old Nix toolchain configuration file
aherrmann f7fc5f7
close GH actions output groups
aherrmann e259d89
Generate GH actions annotations on missing token
aherrmann e496262
Document BuildBuddy token availability
aherrmann bf8580e
Enable manual pipeline runs
aherrmann a4e55d7
Fix annotations file path
aherrmann 3b33fb6
align formatting
aherrmann d1a8e37
Avoid remote caching of remote persistent worker demo
aherrmann 72e35ad
Fix extra space
aherrmann d249932
Update persistent worker example extract_archive
aherrmann 1693bf1
Pin linux-build-examples Ubuntu version
aherrmann de7f3c0
Revert "Pin linux-build-examples Ubuntu version"
aherrmann d9a7303
buck2_error! signature changed
aherrmann 19e9583
Explicit Bazel remote persistent worker support
aherrmann 6a3e3dd
Explicit Bazel remote persistent worker support
aherrmann 8204f04
Update remote persistent worker example
aherrmann 6cee324
fix missing field update
aherrmann 61b9561
update test-case
aherrmann 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
16 changes: 16 additions & 0 deletions
16
.github/actions/build_example_persistent_worker/action.yml
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,16 @@ | ||
name: build_example_persistent_worker | ||
inputs: | ||
buildbuddyApiKey: | ||
description: "The API key for BuildBuddy remote cache and execution." | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Build examples/persistent_worker directory | ||
env: | ||
BUILDBUDDY_API_KEY: ${{ inputs.buildbuddyApiKey }} | ||
run: |- | ||
cd examples/persistent_worker | ||
export PATH="$RUNNER_TEMP/artifacts:$PATH" | ||
./test.sh | ||
shell: bash |
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
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
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
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
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
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
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,17 @@ | ||
[cells] | ||
root = . | ||
prelude = prelude | ||
toolchains = toolchains | ||
none = none | ||
|
||
[cell_aliases] | ||
config = prelude | ||
fbcode = none | ||
fbsource = none | ||
buck = none | ||
|
||
[external_cells] | ||
prelude = bundled | ||
|
||
[parser] | ||
target_platform_detector_spec = target:root//...->prelude//platforms:default |
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,13 @@ | ||
[buck2] | ||
digest_algorithms = SHA256 | ||
|
||
[buck2_re_client] | ||
engine_address = grpc://remote.buildbuddy.io | ||
action_cache_address = grpc://remote.buildbuddy.io | ||
cas_address = grpc://remote.buildbuddy.io | ||
tls = true | ||
http_headers = \ | ||
x-buildbuddy-api-key:$BUILDBUDDY_API_KEY | ||
|
||
[build] | ||
execution_platforms = root//platforms:buildbuddy |
13 changes: 13 additions & 0 deletions
13
examples/persistent_worker/.buckconfig.buildbuddy-persistent-workers
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,13 @@ | ||
[buck2] | ||
digest_algorithms = SHA256 | ||
|
||
[buck2_re_client] | ||
engine_address = grpc://remote.buildbuddy.io | ||
action_cache_address = grpc://remote.buildbuddy.io | ||
cas_address = grpc://remote.buildbuddy.io | ||
tls = true | ||
http_headers = \ | ||
x-buildbuddy-api-key:$BUILDBUDDY_API_KEY | ||
|
||
[build] | ||
execution_platforms = root//platforms:buildbuddy-persistent-workers |
2 changes: 2 additions & 0 deletions
2
examples/persistent_worker/.buckconfig.local-persistent-workers
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,2 @@ | ||
[build] | ||
execution_platforms = root//platforms:local-persistent-workers |
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,2 @@ | ||
[build] | ||
execution_platforms = root//platforms:local |
Empty file.
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,3 @@ | ||
# specify the following: | ||
# - BUILDBUDDY_API_KEY | ||
source_env_if_exists .envrc.private |
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,4 @@ | ||
.buckconfig.local | ||
.direnv | ||
.envrc.private | ||
prelude |
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,26 @@ | ||
load("defs.bzl", "demo", "worker") | ||
|
||
python_binary( | ||
name = "one_shot", | ||
main = "one_shot.py", | ||
) | ||
|
||
python_binary( | ||
name = "worker_py", | ||
main = "persistent_worker.py", | ||
deps = [ | ||
"//proto/bazel:worker_protocol_pb2", | ||
"//proto/buck2:worker_pb2", | ||
], | ||
) | ||
|
||
worker( | ||
name = "worker", | ||
visibility = ["PUBLIC"], | ||
worker = ":worker_py", | ||
) | ||
|
||
[ | ||
demo(name = "demo-" + str(i)) | ||
for i in range(4) | ||
] |
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.
Uh oh!
There was an error while loading. Please reload this page.