Skip to content

Commit

Permalink
Add remote_provider = "..." option, replacing scheme-look-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw committed Nov 24, 2023
1 parent bfb7950 commit 9b71329
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 320 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The values of the `ACTIONS_CACHE_URL` and `ACTIONS_RUNTIME_TOKEN` environment va
uses: actions/github-script@v6
with:
script: |
core.exportVariable('PANTS_REMOTE_STORE_ADDRESS', 'experimental:github-actions-cache+' + (process.env.ACTIONS_CACHE_URL || ''));
core.exportVariable('PANTS_REMOTE_STORE_ADDRESS', process.env.ACTIONS_CACHE_URL);
core.exportVariable('PANTS_REMOTE_OAUTH_BEARER_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN);
```
Expand All @@ -71,6 +71,7 @@ Once the GitHub values are configured, Pants will read the environment variables
```toml
[GLOBAL]
# GitHub Actions cache URL and token are set via environment variables
remote_provider = "experimental-github-actions-cache"
remote_cache_read = true
remote_cache_write = true
```
Expand All @@ -93,7 +94,8 @@ To read and write the cache to `/path/to/cache`, you will need to configure `pan

```toml
[GLOBAL]
remote_store_address = "experimental:file:///path/to/cache"
remote_store_provider = "experimental-file"
remote_store_address = "file:///path/to/cache"
remote_cache_read = true
remote_cache_write = true
```
Expand Down
5 changes: 2 additions & 3 deletions src/python/pants/engine/internals/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
LOCAL_STORE_LEASE_TIME_SECS,
ExecutionOptions,
LocalStoreOptions,
normalize_remote_address,
)
from pants.util.contextutil import temporary_file_path
from pants.util.logging import LogLevel
Expand Down Expand Up @@ -193,8 +192,8 @@ def __init__(
execution_headers=execution_options.remote_execution_headers,
execution_overall_deadline_secs=execution_options.remote_execution_overall_deadline_secs,
execution_rpc_concurrency=execution_options.remote_execution_rpc_concurrency,
store_address=normalize_remote_address(execution_options.remote_store_address),
execution_address=normalize_remote_address(execution_options.remote_execution_address),
store_address=execution_options.remote_store_address,
execution_address=execution_options.remote_execution_address,
execution_process_cache_namespace=execution_options.process_execution_cache_namespace,
instance_name=execution_options.remote_instance_name,
root_ca_certs_path=execution_options.remote_ca_certs_path,
Expand Down
Loading

0 comments on commit 9b71329

Please sign in to comment.