Skip to content
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

Add --remote-execution-cache-key-gen-version #6809

Merged
merged 3 commits into from Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/python/pants/engine/native.py
Expand Up @@ -210,6 +210,7 @@
Buffer,
Buffer,
Buffer,
Buffer,
uint64_t,
uint64_t,
uint64_t,
Expand Down Expand Up @@ -880,6 +881,7 @@ def tc(constraint):
# We can't currently pass Options to the rust side, so we pass empty strings for None.
self.context.utf8_buf(execution_options.remote_store_server or ""),
self.context.utf8_buf(execution_options.remote_execution_server or ""),
self.context.utf8_buf(execution_options.remote_execution_cache_key_gen_version or ""),
self.context.utf8_buf(execution_options.remote_instance_name or ""),
self.context.utf8_buf(execution_options.remote_ca_certs_path or ""),
self.context.utf8_buf(execution_options.remote_oauth_bearer_token_path or ""),
Expand Down
6 changes: 6 additions & 0 deletions src/python/pants/option/global_options.py
Expand Up @@ -37,6 +37,7 @@ class ExecutionOptions(datatype([
'remote_store_chunk_upload_timeout_seconds',
'process_execution_parallelism',
'process_execution_cleanup_local_dirs',
'remote_execution_cache_key_gen_version',
'remote_instance_name',
'remote_ca_certs_path',
'remote_oauth_bearer_token_path',
Expand All @@ -57,6 +58,7 @@ def from_bootstrap_options(cls, bootstrap_options):
remote_store_chunk_upload_timeout_seconds=bootstrap_options.remote_store_chunk_upload_timeout_seconds,
process_execution_parallelism=bootstrap_options.process_execution_parallelism,
process_execution_cleanup_local_dirs=bootstrap_options.process_execution_cleanup_local_dirs,
remote_execution_cache_key_gen_version=bootstrap_options.remote_execution_cache_key_gen_version,
remote_instance_name=bootstrap_options.remote_instance_name,
remote_ca_certs_path=bootstrap_options.remote_ca_certs_path,
remote_oauth_bearer_token_path=bootstrap_options.remote_oauth_bearer_token_path,
Expand All @@ -71,6 +73,7 @@ def from_bootstrap_options(cls, bootstrap_options):
remote_store_chunk_upload_timeout_seconds=60,
process_execution_parallelism=multiprocessing.cpu_count()*2,
process_execution_cleanup_local_dirs=True,
remote_execution_cache_key_gen_version=None,
remote_instance_name=None,
remote_ca_certs_path=None,
remote_oauth_bearer_token_path=None,
Expand Down Expand Up @@ -295,6 +298,9 @@ def register_bootstrap_options(cls, register):
register('--remote-store-chunk-upload-timeout-seconds', type=int, advanced=True,
default=DEFAULT_EXECUTION_OPTIONS.remote_store_chunk_upload_timeout_seconds,
help='Timeout (in seconds) for uploads of individual chunks to the remote file store.')
register('--remote-execution-cache-key-gen-version', advanced=True,
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an opportunity to shorten this name, and have the help refer to the previous name... maybe --remote-execution-cache-namespace?

And given that this will only affect process invokes (and not CAS uploads), maybe --remote-execution-process-cache-namespace (or whatever the remote execution API calls this cache).

help="The cache key generation for remote execution."
"Bump this to invalidate every artifact's remote execution.")
register('--remote-instance-name', advanced=True,
help='Name of the remote execution instance to use. Used for routing within '
'--remote-execution-server and --remote-store-server.')
Expand Down