summaryrefslogtreecommitdiff
path: root/buildstream/context.py
Commit message (Collapse)AuthorAgeFilesLines
* context.py: Support user specified project optionsTristan Van Berkom2017-10-081-6/+5
| | | | | | Constructor now expects cli_options to be specified, and now loading the project overrides supports the 'options' for a given project.
* context.py: Make _get_overrides() take a project name, not a project.Tristan Van Berkom2017-10-021-3/+3
| | | | | | | This is merely a protection against crossing the project/context wires together. The Project will gain knowledge of the context soon, so it's better that the context itself remain without any knowledge of the context.
* _yaml.py: Fixing inconsistently named API _yaml.validate_node()Tristan Van Berkom2017-10-011-5/+5
| | | | | | | | | | All of the _yaml APIs which deal with a node (dictionary loaded from YAML) are named _yaml.node_foo(), _yaml.node_bar(), _yaml.node_baz() etc, except for this one glaring exception. Also added a missing internal API documenting comment for _yaml.node_validate() Also updated all callers to _yaml.validate_node() to now call _yaml.node_validate().
* context.py: Add _get_overrides() and basic project override validationTristan Van Berkom2017-10-011-11/+29
| | | | | | | This is just a step towards making the per-project overrides a little bit more comprehensive in the code base. Also, validation was missing on the overrides entirely.
* Add platform factoriesTristan Maat2017-09-281-0/+1
|
* Let users override project artifacts optionsMathieu Bridon2017-09-191-1/+8
| | | | | | | | | | | | | | | | | | | A project can specify its artifacts cache sharing settings, and users can define a default artifacts cache to use as a fallback. With this change, users can also override the project configuration with their own. That means for a project named "libfoo", BuildStream will resolve the artifacts-related options in the following order: 1. the projects.libfoo.artifacts options from the user configuration; 2. if the above was not defined, then the artifacts options from the project configuration; 3. if the above was not defined, then the artifacts options from the user configuration; Fixes #87
* context.py: Add user config node validationsTristan Maat2017-09-141-0/+18
|
* documentation: Set page titles manually in python modules.Tristan Van Berkom2017-08-311-1/+3
|
* Add network-retries optionJürg Billeter2017-07-271-0/+4
| | | | | | Retry network tasks up to two times by default. Fixes #30
* context.py: Add strict_build_plan optionJürg Billeter2017-07-141-0/+5
|
* context.py: Add option to specify artifact push portTristan Van Berkom2017-07-111-2/+6
|
* context.py & userconfig.yaml: New syntax for remote artifact cachesTristan Van Berkom2017-07-091-6/+9
|
* Add --host-arch and --target-arch, and 'host-arches' conditionalSam Thursfield2017-07-061-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command adds initial cross-compilation support to BuildStream. It has been tested against a converted version of the Baserock compiler bootstrap and used to cross build sysroots for armv8l64 and ppc64l from an x86_64 host. For example, to build a sysroot for ARM v8 64-bit you can do this: bst build --target-arch=armv8b64 gnu-toolchain/stage2.bst This would cause the adapted Baserock definitions to produce a stage1 simple cross compiler that runs on the native architecture and produces armv8b64 binaries, and then cross build a stage2 sysroot that executes on armv8b64. Currently the --host-arch option does nothing of use. It will one day enable host-incompatible builds using a QEMU-powered cross sandbox. The `--arch=` option is now shorthand for `--host-arch= --target-arch=`. Elements have 2 new variables available, %{bst-host-arch} and %{bst-target-arch}. The 'arches' conditional now follows %{bst-target-arch}, while the new 'host-arches' conditional follows %{bst-host-arch}. All of --arch, --host-arch and --target-arch default to the output of `uname -a`. There's no magic here that would make all BuildStream elements suddenly able to cross compile. It is up to an individual element to support this by honouring %{bst-target-arch} in whatever way makes sense.
* context.py: Add artifact-share config optionJürg Billeter2017-06-271-0/+8
|
* scheduler: Add push queue typeJürg Billeter2017-06-271-0/+4
|
* context.py & default user config: Added message_lines optionTristan Van Berkom2017-05-191-0/+4
| | | | | | | Allows one to configure the maximum amount of lines to print of a message detail into the master log and console (the entirety of lengthy lines are always printed in the individual build logs anyway, this just makes the frontend a bit more bearable)
* context.py and default config: Added element-format configurationTristan Van Berkom2017-05-091-0/+4
| | | | | Allow some control on how the pipeline elements are formatted and displayed in the heading at startup time.
* Documentation: Added user facing configuration sectionTristan Van Berkom2017-05-031-9/+0
| | | | | | | Instead of documenting this in the Context object, provide a section more targetted at users. The default configuration is shown in the user facing documentation and removed from the Context object documentation which is more targetted at API references for plugin authors.
* context.py: Fixed local caching of cache keyTristan Van Berkom2017-03-241-2/+2
| | | | | | Was using double underscore instead of underscore, mixing up variables (result, cache key never locally cached, always recalculated on demand).
* context.py: Do the XDG var expansions without xdg external dependencyTristan Van Berkom2017-03-211-11/+17
| | | | | | The python xdg package is a couple of lines of python which are not purely python3, this seems to cause problems on the gitlab runners and not worth the dependency, dropping it.
* context.py: Document the sched_error_action memberTristan Van Berkom2017-03-201-0/+3
|
* context.py: Now using the XDG Base Directory specTristan Van Berkom2017-03-201-9/+29
| | | | | | | | | | | | | | o Attempt to load user configuration from ${XDG_CONFIG_HOME}/buildstream.conf if one exists, only if not overridden on the command line o Set the XDG Base Directory values at initialization time o Allow environment vars to be specified in paths o userconfig.yaml: Default paths now use XDG_CACHE_HOME instead of ~/buildstream o Removed the deploydir and ccache dir as we're not using those, we'll re-add those configs if they become relevant.
* context.py: Store config_origin, the config file which was used.Tristan Van Berkom2017-03-081-0/+4
|
* context.py: Added cache key abbreviation length setting.Tristan Van Berkom2017-03-021-0/+4
| | | | | Not for the underlying keys, only for abbreviated keys to display in the UI which should be more than strong enough.
* context.py: Use Mapping in _yaml.node_get()Tristan Van Berkom2017-02-261-3/+3
| | | | | This is more accurate than 'dict', it can be a ChainMap sometimes which will not be a 'dict'
* context.py: Profile the context loadingTristan Van Berkom2017-02-261-0/+4
|
* context.py: Remove unused default implementation of logging to stdout.Tristan Van Berkom2017-02-251-19/+7
| | | | This is dead code, and is better served with an assert().
* context.py: Control message silencing on depth stackTristan Van Berkom2017-02-231-6/+18
| | | | | | | | | | | When pushing & popping message depth, now record whether the new silent_nested parameter was set. In the default handler, whenever publishing a message, silence the message if we're in a depth with silent messages. Also export _silent_messages() for implementors of the message handler (scheduler)
* context.py: Added scheduler options and message depth counterTristan Van Berkom2017-01-141-3/+41
| | | | | | | Configure how many parallel fetchers or builders you want. Message depth tracks possibly recursive timed activity depth within tasks so that depth can be reported in the message.
* context.py & config: Added logging configurationsTristan Van Berkom2017-01-121-2/+20
|
* context.py: Now stores a frontent message handler.Tristan Van Berkom2017-01-121-0/+34
| | | | | | | | | | All messages are proxied through the context which is shared across pipelines and created by the frontent. The frontend can override how logging is done. In sub processes, the frontend of the element is the scheduler job itself, which then proxies messages through a Queue object (implented with a pipe).
* context.py: Use utils._generate_key()Tristan Van Berkom2017-01-091-5/+3
|
* context.py: Implement _get_cache_key()Tristan Van Berkom2017-01-091-0/+29
| | | | Mostly code from Jürg Billeter's branch.
* context.py: Make the config file show up as yaml in the docsTristan Van Berkom2017-01-061-0/+1
|
* context.py: Use simplified _yaml.composite() instead of _yaml.composite_dict()Tristan Van Berkom2016-12-311-9/+1
|
* context.py: expand ~ in pathsJürg Billeter2016-12-151-1/+2
|
* context.py: use loop for directoriesJürg Billeter2016-12-151-7/+2
|
* Renamed Context defaultconfig.yaml -> userconfig.yamlTristan Van Berkom2016-12-131-2/+2
| | | | | An internal file, but better named since we'll be adding projectconfig.yaml beside it.
* context.py: Use _yaml.node_get() for accessing variablesTristan Van Berkom2016-12-131-5/+5
| | | | | This way we get useful loaderrors if expected configuration values are missing or declared with incorrect types.
* context.py: Unwrap needlessly wrapped lineTristan Van Berkom2016-12-101-7/+5
|
* pep8 fixes in context.pyTristan Van Berkom2016-12-101-5/+8
|
* Context: Now use new _yaml module for loading the yamlTristan Van Berkom2016-11-281-4/+13
|
* _site.py: simplify this fileTristan Van Berkom2016-11-151-2/+2
| | | | | | | | | | Now modules import as: from . import _site And refer to things as _site.root, _site.default_config etc. Also now follow principal of least underscores
* Moved default.yaml -> defaultconfig.yamlTristan Van Berkom2016-11-151-1/+1
| | | | | This is a more descriptive name, it's the defaults for user configurations.
* Context: Add module level documentation with literalinclude of default configTristan Van Berkom2016-11-151-9/+22
| | | | | | This allows us to document the default configuration by simply including the yaml file directly in the docs. This way whenever the default configuration changes these changes will be reflected in the docs automatically.
* Moved YAML dictionary loading to utils.pyTristan Van Berkom2016-11-151-27/+6
| | | | And renamed ContextError exception to a more general LoadError.
* Context: Improved docstringTristan Van Berkom2016-11-141-0/+3
|
* Rename InvocationContext -> ContextTristan Van Berkom2016-11-141-0/+100
It's a bit big and wordy, looks like it makes sense to just call it "Context".