summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-11-15 14:18:54 +0100
committerJürg Billeter <j@bitron.ch>2018-11-15 15:46:38 +0100
commitf78a72a2fab17a799b1c36d66fca826f6ef34104 (patch)
treeffb17e1adcbcbb5b9a3e1a6297259b6d2d9ffdd0
parent2d5a5cc05720b9fec3bac9ed4ba3f96ed5803eb0 (diff)
downloadbuildstream-juerg/context-default-values.tar.gz
_context.py: Drop duplicated default values for user configurationjuerg/context-default-values
The default values are in userconfig.yaml, together with the documentation. The default values should not be duplicated in _context.py.
-rw-r--r--buildstream/_context.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/buildstream/_context.py b/buildstream/_context.py
index 876b74712..27c545fbd 100644
--- a/buildstream/_context.py
+++ b/buildstream/_context.py
@@ -63,25 +63,25 @@ class Context():
self.artifactdir = None
# The locations from which to push and pull prebuilt artifacts
- self.artifact_cache_specs = []
+ self.artifact_cache_specs = None
# The directory to store build logs
self.logdir = None
# The abbreviated cache key length to display in the UI
- self.log_key_length = 0
+ self.log_key_length = None
# Whether debug mode is enabled
- self.log_debug = False
+ self.log_debug = None
# Whether verbose mode is enabled
- self.log_verbose = False
+ self.log_verbose = None
# Maximum number of lines to print from build logs
- self.log_error_lines = 0
+ self.log_error_lines = None
# Maximum number of lines to print in the master log for a detailed message
- self.log_message_lines = 0
+ self.log_message_lines = None
# Format string for printing the pipeline at startup time
self.log_element_format = None
@@ -90,19 +90,22 @@ class Context():
self.log_message_format = None
# Maximum number of fetch or refresh tasks
- self.sched_fetchers = 4
+ self.sched_fetchers = None
# Maximum number of build tasks
- self.sched_builders = 4
+ self.sched_builders = None
# Maximum number of push tasks
- self.sched_pushers = 4
+ self.sched_pushers = None
# Maximum number of retries for network tasks
- self.sched_network_retries = 2
+ self.sched_network_retries = None
# What to do when a build fails in non interactive mode
- self.sched_error_action = 'continue'
+ self.sched_error_action = None
+
+ # Size of the artifact cache in bytes
+ self.config_cache_quota = None
# Whether elements must be rebuilt when their dependencies have changed
self._strict_build_plan = None
@@ -120,7 +123,6 @@ class Context():
self._workspaces = None
self._log_handle = None
self._log_filename = None
- self.config_cache_quota = 'infinity'
# load()
#
@@ -180,7 +182,7 @@ class Context():
cache = _yaml.node_get(defaults, Mapping, 'cache')
_yaml.node_validate(cache, ['quota'])
- self.config_cache_quota = _yaml.node_get(cache, str, 'quota', default_value='infinity')
+ self.config_cache_quota = _yaml.node_get(cache, str, 'quota')
# Load artifact share configuration
self.artifact_cache_specs = ArtifactCache.specs_from_config_node(defaults)