in src/buildstream/_context.py [0:0]
def __init__(self, *, use_casd: bool = True) -> None:
# Whether we are running as part of a test suite. This is only relevant
# for developing BuildStream itself.
self.is_running_in_test_suite: bool = "BST_TEST_SUITE" in os.environ
# Filename indicating which configuration file was used, or None for the defaults
self.config_origin: Optional[str] = None
# The directory under which other directories are based
self.cachedir: Optional[str] = None
# The directory where various sources are stored
self.sourcedir: Optional[str] = None
# The directory where build sandboxes will be created
self.builddir: Optional[str] = None
# The directory for CAS
self.casdir: Optional[str] = None
# Whether to use casd - meant for interfaces such as
# completion where casd is not required
self.use_casd: bool = use_casd
# Whether we are going to build, this is required for some conditional
# functionality to take place only in the case that we are building.
self.build: bool = False
# The directory for artifact protos
self.artifactdir: Optional[str] = None
# The directory for temporary files
self.tmpdir: Optional[str] = None
# Default root location for workspaces
self.workspacedir: Optional[str] = None
# The global remote execution configuration
self.remote_execution_specs: Optional[RemoteExecutionSpec] = None
# The configured artifact cache remote specs for each project
self.project_artifact_cache_specs: Dict[str, List[RemoteSpec]] = {}
# The configured source cache remote specs for each project
self.project_source_cache_specs: Dict[str, List[RemoteSpec]] = {}
# The directory to store build logs
self.logdir: Optional[str] = None
# The abbreviated cache key length to display in the UI
self.log_key_length: Optional[int] = None
# Whether debug mode is enabled
self.log_debug: Optional[int] = None
# Whether verbose mode is enabled
self.log_verbose: Optional[int] = None
# Maximum number of lines to print from build logs
self.log_error_lines: Optional[int] = None
# Maximum number of lines to print in the master log for a detailed message
self.log_message_lines: Optional[int] = None
# Format string for printing the pipeline at startup time
self.log_element_format: Optional[str] = None
# Format string for printing message lines in the master log
self.log_message_format: Optional[str] = None
# Wether to rate limit the updating of the bst output where applicable
self.log_throttle_updates: Optional[int] = None
# Maximum number of fetch or refresh tasks
self.sched_fetchers: Optional[int] = None
# Maximum number of build tasks
self.sched_builders: Optional[int] = None
# Maximum number of push tasks
self.sched_pushers: Optional[int] = None
# Maximum number of retries for network tasks
self.sched_network_retries: Optional[int] = None
# What to do when a build fails in non interactive mode
self.sched_error_action: Optional[str] = None
# Maximum jobs per build
self.build_max_jobs: Optional[int] = None
# Retry any existing failed builds
self.build_retry_failed: Optional[bool] = None
# Control which dependencies to build
self.build_dependencies: Optional[_PipelineSelection] = None
# Control which URIs can be accessed when fetching sources
self.fetch_source: Optional[str] = None
# Control which URIs can be accessed when tracking sources
self.track_source: Optional[str] = None
# Size of the artifact cache in bytes
self.config_cache_quota: Optional[int] = None
# User specified cache quota, used for display messages
self.config_cache_quota_string: Optional[str] = None
# Reserved disk space for local cache in bytes
self.config_cache_reserved: Optional[int] = None
# Low watermark for local cache (ratio relative to effective quota)
self.config_cache_low_watermark: Optional[float] = None
# Remote cache server
self.remote_cache_spec: Optional[RemoteSpec] = None
# Whether or not to attempt to pull build trees globally
self.pull_buildtrees: Optional[bool] = None
# Whether or not to cache build trees on artifact creation
self.cache_buildtrees: Optional[str] = None
# Don't shoot the messenger
self.messenger: Messenger = Messenger()
# Make sure the XDG vars are set in the environment before loading anything
self._init_xdg()
#
# Private variables
#
# Whether elements must be rebuilt when their dependencies have changed
self._strict_build_plan: Optional[bool] = None
# Lists of globally configured cache configurations
self._global_artifact_cache_config: _CacheConfig = _CacheConfig(False, [])
self._global_source_cache_config: _CacheConfig = _CacheConfig(False, [])
# Set of all actively configured remote specs
self._active_artifact_cache_specs: Set[RemoteSpec] = set()
self._active_source_cache_specs: Set[RemoteSpec] = set()
self._platform: Optional[Platform] = None
self._artifactcache: Optional[ArtifactCache] = None
self._elementsourcescache: Optional[ElementSourcesCache] = None
self._sourcecache: Optional[SourceCache] = None
self._projects: List["Project"] = []
self._project_overrides: MappingNode = Node.from_dict({})
self._workspaces: Optional[Workspaces] = None
self._workspace_project_cache: WorkspaceProjectCache = WorkspaceProjectCache()
self._casd: Optional[CASDProcessManager] = None
self._cascache: Optional[CASCache] = None