-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add remote persistent worker support (#800)
Summary: Pull Request resolved: #800 Differential Revision: D65214397
- Loading branch information
1 parent
6abf420
commit 449b651
Showing
40 changed files
with
1,196 additions
and
6 deletions.
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.