Class RemoteExecutionConfig

    • Field Detail

      • LOG

        public static final Logger LOG
      • DEFAULT_REMOTE_STRATEGY_THREADS

        public static final int DEFAULT_REMOTE_STRATEGY_THREADS
        See Also:
        Constant Field Values
      • DEFAULT_REMOTE_CONCURRENT_ACTION_COMPUTATIONS

        public static final int DEFAULT_REMOTE_CONCURRENT_ACTION_COMPUTATIONS
        See Also:
        Constant Field Values
      • DEFAULT_REMOTE_CONCURRENT_PENDING_UPLOADS

        public static final int DEFAULT_REMOTE_CONCURRENT_PENDING_UPLOADS
        See Also:
        Constant Field Values
      • DEFAULT_REMOTE_CONCURRENT_EXECUTIONS

        public static final int DEFAULT_REMOTE_CONCURRENT_EXECUTIONS
        See Also:
        Constant Field Values
      • DEFAULT_REMOTE_CONCURRENT_RESULT_HANDLING

        public static final int DEFAULT_REMOTE_CONCURRENT_RESULT_HANDLING
        See Also:
        Constant Field Values
      • DEFAULT_REMOTE_OUTPUT_MATERIALIZATION_THREADS

        public static final int DEFAULT_REMOTE_OUTPUT_MATERIALIZATION_THREADS
        See Also:
        Constant Field Values
      • DEFAULT_IS_LOCAL_FALLBACK_ENABLED

        public static final boolean DEFAULT_IS_LOCAL_FALLBACK_ENABLED
        See Also:
        Constant Field Values
      • DEFAULT_IS_LOCAL_FALLBACK_DISABLED_ON_CORRUPT_ARTIFACTS

        public static final boolean DEFAULT_IS_LOCAL_FALLBACK_DISABLED_ON_CORRUPT_ARTIFACTS
        See Also:
        Constant Field Values
      • DEFAULT_IS_LOCAL_FALLBACK_ENABLED_FOR_COMPLETED_ACTION

        public static final boolean DEFAULT_IS_LOCAL_FALLBACK_ENABLED_FOR_COMPLETED_ACTION
        See Also:
        Constant Field Values
      • TENANT_ID_KEY

        public static final String TENANT_ID_KEY
        Tenant ID that will be attached to each action *
        See Also:
        Constant Field Values
      • CONCURRENT_EXECUTIONS_KEY

        public static final String CONCURRENT_EXECUTIONS_KEY
        Limit on the number of outstanding execution requests. This is probably the value that's most likely to be non-default.
        See Also:
        Constant Field Values
      • CONCURRENT_ACTION_COMPUTATIONS_KEY

        public static final String CONCURRENT_ACTION_COMPUTATIONS_KEY
        Number of actions to compute at a time. These should be <25ms average, but require I/O and cpu.
        See Also:
        Constant Field Values
      • CONCURRENT_RESULT_HANDLING_KEY

        public static final String CONCURRENT_RESULT_HANDLING_KEY
        Number of results to concurrently handle at a time.
        See Also:
        Constant Field Values
      • OUTPUT_MATERIALIZATION_THREADS_KEY

        public static final String OUTPUT_MATERIALIZATION_THREADS_KEY
        Number of threads to handle output materialization.
        See Also:
        Constant Field Values
      • IS_LOCAL_FALLBACK_ENABLED_KEY

        public static final String IS_LOCAL_FALLBACK_ENABLED_KEY
        Whether failed remote executions are retried locally.
        See Also:
        Constant Field Values
      • IS_LOCAL_FALLBACK_DISABLED_ON_CORRUPT_ARTIFACTS_KEY

        public static final String IS_LOCAL_FALLBACK_DISABLED_ON_CORRUPT_ARTIFACTS_KEY
        Whether failed remote executions are retried locally if the artifacts are corrupted.
        See Also:
        Constant Field Values
      • MAX_INPUT_SIZE_BYTES

        public static final String MAX_INPUT_SIZE_BYTES
        The maximum size of inputs allowed on remote execution, if unset, no maximum.
        See Also:
        Constant Field Values
      • LARGE_BLOB_SIZE_BYTES

        public static final String LARGE_BLOB_SIZE_BYTES
        The large blob size bytes threshold, if unset, no threshold.
        See Also:
        Constant Field Values
      • STRATEGY_WORKER_THREADS_KEY

        public static final String STRATEGY_WORKER_THREADS_KEY
        Number of threads for the strategy to do its work. This doesn't need to be a lot, but should probably be greater than concurrent_result_handling below.
        See Also:
        Constant Field Values
      • CONCURRENT_PENDING_UPLOADS_KEY

        public static final String CONCURRENT_PENDING_UPLOADS_KEY
        Number of pending uploads at a time. While an action is pending uploads, it may hold a reference to some large-ish data (>1MB). If this limit is reached, it will also block future action computations until uploads finish.
        See Also:
        Constant Field Values
      • DEBUG_FORMAT_STRING_URL_KEY

        public static final String DEBUG_FORMAT_STRING_URL_KEY
        URL format string for debug UI on the super console
        See Also:
        Constant Field Values
      • FORMAT_SESSION_ID_VARIABLE_STRING

        public static final String FORMAT_SESSION_ID_VARIABLE_STRING
        The variable identifier string to be replace in any configured format defined by DEBUG_FORMAT_STRING_URL_KEY. This is being presented to avoid string duplication.
        See Also:
        Constant Field Values
      • MAX_WORKER_SIZE_TO_STEAL_FROM

        public static final String MAX_WORKER_SIZE_TO_STEAL_FROM
        Actions which require a worker of this size (or higher) will not be stolen locally when running in hybrid mode
        See Also:
        Constant Field Values
      • RE_SESSION_LABEL_KEY

        public static final String RE_SESSION_LABEL_KEY
        Free form string label that can be passed along any Remote Execution session. Useful for logging.
        See Also:
        Constant Field Values
      • WORKER_REQUIREMENTS_FILENAME

        public static final String WORKER_REQUIREMENTS_FILENAME
        Worker requirements filename
        See Also:
        Constant Field Values
      • IS_LOCAL_FALLBACK_ENABLED_FOR_COMPLETED_ACTION_KEY

        public static final String IS_LOCAL_FALLBACK_ENABLED_FOR_COMPLETED_ACTION_KEY
        See Also:
        Constant Field Values
      • AUTO_RE_BUILD_PROJECTS_WHITELIST_KEY

        public static final String AUTO_RE_BUILD_PROJECTS_WHITELIST_KEY
        See Also:
        Constant Field Values
      • AUTO_RE_STRATEGY_KEY

        public static final String AUTO_RE_STRATEGY_KEY
        Strategy used to determine whether to enable Remote Execution automatically for the current build
        See Also:
        Constant Field Values
      • USE_REMOTE_EXECUTION_FOR_GENRULE_IF_REQUESTED_FORMAT

        public static final String USE_REMOTE_EXECUTION_FOR_GENRULE_IF_REQUESTED_FORMAT
        See Also:
        Constant Field Values
    • Constructor Detail

      • RemoteExecutionConfig

        public RemoteExecutionConfig()
    • Method Detail

      • getUseRemoteExecutionForGenruleIfRequestedField

        public static String getUseRemoteExecutionForGenruleIfRequestedField​(String type)
      • shouldUseRemoteExecutionForGenruleIfRequested

        public boolean shouldUseRemoteExecutionForGenruleIfRequested​(String type)
        Returns whether or not we should honor the `remote` argument to `genrule`, which requests that the genrule run remotely.
      • isRemoteExecutionAutoEnabled

        public boolean isRemoteExecutionAutoEnabled​(String username,
                                                    List<String> commandArguments)
      • getRemoteHost

        public String getRemoteHost()
      • getRemotePort

        public int getRemotePort()
      • getCasHost

        public String getCasHost()
      • getCasPort

        public int getCasPort()
      • getCasDeadline

        public int getCasDeadline()
      • getInsecure

        public boolean getInsecure()
      • getCasInsecure

        public boolean getCasInsecure()
      • getCertFile

        public Optional<Path> getCertFile()
        client TLS certificate file in PEM format
      • getKeyFile

        public Optional<Path> getKeyFile()
        client TLS private key in PEM format
      • getCertificateAuthoritiesFile

        public Optional<Path> getCertificateAuthoritiesFile()
        file containing all TLS authorities to verify server certificate with (PEM format)
      • getMaxWorkerSizeToStealFrom

        public Optional<com.facebook.buck.remoteexecution.proto.WorkerRequirements.WorkerSize> getMaxWorkerSizeToStealFrom()
      • getTenantId

        public String getTenantId()
      • getDebugURLString

        public String getDebugURLString​(com.facebook.buck.remoteexecution.proto.RESessionID reSessionID)
      • isDebug

        public boolean isDebug()
      • isConsoleEnabled

        public boolean isConsoleEnabled()
        Whether Console output of Remote Execution information is enabled.
      • getReSessionLabel

        public String getReSessionLabel()
      • getAuxiliaryBuildTag

        public String getAuxiliaryBuildTag()
        Provides an auxiliary tag used for capturing any custom configurations.
      • validateCertificatesOrThrow

        public void validateCertificatesOrThrow()