| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This adds the _update_state() method to the Source class, similar to the
corresponding method in the Element class.
|
|
|
|
|
| |
_force_inconsistent is too low level. Keep that detail contained in the
Source class.
|
| |
|
|
|
|
|
|
|
|
| |
Recently I added the `reason` member which can be used to set
machine readable error reason strings for the purpose of testing.
Forgot to add the necessary `*` argument, forcing `reason` to be
a keyword-only argument.
|
|
|
|
|
|
|
| |
directory
This changes the UX to report a better human readable error, which
is otherwise a BUG message with stack trace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Outline of changes to exceptions:
o Now BstError base class has a `domain` and `reason` member,
reason members are optional.
o All derived error classes now specify their `domain`
o For LoadError, LoadErrorReason defines the error's `reason`
o Now the scheduler `job` class takes care of sending the error
reason and domain back to the main process where the last
exception which caused a child task to fail can be discretely stored.
|
| |
|
|
|
|
|
|
| |
In order to avoid multiple traversals of the file system when the workspace key
is requested multiple times, it is now cached in the source element. The cache
is invalidated if the workspace is deleted or moved.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes workspaces created with the git source element so that the
origin remote points to the source repository of the build element as
opposed to the internal repository in the bst cache.
This introduces an addition of the init_workspace method in the source
API. This method, which defaults to calling stage, is for the setup of
the workspace after the creation of the workspace directory.
This is a part of issue #53
|
|
|
|
|
|
|
|
|
|
| |
Consequently:
o Changed Plugin.get_context() to a private Plugin._get_context() accessor.
o Updated anything which imports Context to do so from private _context module
o Updated docs to exclude the now private Context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required adding two new APIs to make up for it on the Source
o get_project_directory()
Added here because elements should not be accessing external
resources, Sources needed for local files and GPG keys and such
o translate_url()
Used by sources to mish-mash the project aliases and create
real urls.
|
|
|
|
|
|
| |
Base class for exceptions is now a part of the already private _exceptions module
Also moved PipelineError from _pipeline -> _exceptions module
|
|
|
|
| |
Hide all of buildstream's internal exceptions from the API surface.
|
|
|
|
|
|
|
|
|
|
| |
create SandboxError
These errors are a part of public facing API, and the exceptions
module contains a lot of internal details to be hidden from public API.
This move required creating SandboxError because sandbox related
code had previously been hijacking the ElementError and raising that.
|
|
|
|
|
| |
This is the wrong place for the check, it needs to be done once
for the toplevel staging directory, not for each source.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Avoid trying to calculate cache keys and then running into an error
by just considering workspaces with missing content to be inconsistent.
This fixes issue #80
|
|
|
|
|
|
|
|
| |
NOTE: This commit changes cache keys for everything !
The core parses a 'directory' parameter which effects how all
sources are staged. This obviously changes the build but until now
this was ignored in cache key calculation.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It is usually created by integration commands when staging dependencies,
but we cannot rely on this as some elements have no dependencies, and
some sources handle the non-existence of 'directory' better than others.
To avoid mandating that every source must be able to cope with
'directory's not existence, source will ensure it exists.
|
|
|
|
|
| |
For initializing a pipeline in a forcefully inconsistent state,
this is required for pipelines which execute TrackQueues.
|
| |
|
|
|
|
|
|
| |
This is for Source implementations to use a temp directory, this
should be used instead of python tempdir APIs because it will cleanup
the tempdir automatically in the case of user provoked termination.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o The metaelements and metasources now carry the name, the loader
resolves source names now.
o Element/Source factories dont require a name anymore as they
are already in the meta objects
o Pipeline no longer composes names
o Element.name is now the original project relative filename,
this allows plugins to identify that name in their dependencies,
allowing one to express configuration which identifies elements
by the same name that the user used in the dependencies.
o Removed plugin._get_display_name() in favor of the plugin.name
o Added Element.normal_name, for the cases where we need to have
a normalized name for creating directories and log files
o Updated frontend and test cases and all callers to use the
new naming
|
|
|
|
| |
This was missed in the previous changes regarding caching
|
| |
|
|
|
|
| |
Now adds Consistency class for consistency options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we have a different API around refreshing tracking references:
o get_ref(): Source should return currently set reference
o set_ref(): Source should update current ref, and update
the passed yaml node
o track(): Return the latest reference for a symbolic tracking ref,
this may involve network usage enough to track the new
ref.
This way we dont try to serialize entire yaml documents over the
subprocess pipe, some of the formatting I think may have been lost in
serialization.
|
|
|
|
|
| |
This internal method acts as a controller method and
does the conversion for the 'directory' parameter.
|
| |
|
| |
|
|
|
|
|
| |
Use _refresh() and _consistent() internally, now we
cache the consistent state making things a bit less loopy
|
|
|
|
|
|
|
| |
This is expected to return True if the ref is set and the source
can be fetched and staged, otherwise False. If a source is
inconsistent, it means that it needs to be sucessfully refreshed
(from any track that might be supported in the source).
|
|
|
|
| |
Now refresh returns True if the refresh resulted in any change.
|
| |
|
|
|
|
| |
Same should be done for Elements.
|
|
|
|
|
|
| |
The get_mirror_directory() method is just convenience for the
Source implementation to get it's own private mirroring base directory,
which is a subdirectory of the user specified sources directory.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of declaring per operation exceptions, like PreflightError
and FetchError etc, just declare exceptions per domain. Replaced
the former errors with SourceError for Source implementations
and ElementError for element implementations.
The core will be able to report errors differently depending on
what they asked given plugins to do, and handle a reduced set
of exceptions.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better to have a separate file for each class clearly addressing
it's purpose with it's filename.
Source base data model -> source.py
SourceFactory -> _sourcefactory.py
Element base data model -> element.py
ElementFactory -> _elementfactory.py
Also moved the _plugin.py to _plugincontext.py, since the object
is infact _PluginContext, lets follow this rule all around for
code clarity.
|
| |
|