| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The source fetchers might be a list or a generator, when it is
a generator (like the git source does), then we want to ensure that
we silence the status messages which might occur as a result of
consuming a source fetcher from the generator.
This fixes the logs to be less verbose.
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where the re-instantiated Source used with
Source mirroring enabled is not completely initialized.
Failing to load the ref from the project.refs file for instance,
will result in a crash at `fetch` time.
This fixes issue #666
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Plugin.configure()
This cannot test for unaliased URLs, as those can be discovered later
on outside of user provided element configuration; at least we
assert that if an alias was used, we have seen it at load time.
This will cause a BUG to occur for a plugin which marks an aliased
URL (or attempts to translate one) outside of `Plugin.configure()`,
if that URL was not previously seen.
This is a part of #620
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Source must now mention whether the marked or translated
URL is "primary" or not. Even when a Source may have multiple
URLs, the auxilliary URLs are derived from the primary one, not
only is this true for git, but it is mandated by our tracking
API which assumes there is a primary URL.
This adjusts the `git` source and the test `fetch_source.py` source
to behave properly and advertize it's primary URL properly.
This is a part of #620
|
|
|
|
|
|
|
|
|
| |
Keeps track of whether the plugin is currently being configured.
Adjusted Element and Source classes to call _configure() in place
of calling configure() directly.
This is a part of #620
|
|
|
|
|
|
|
| |
A download URL must be interpreted by the core at `Plugin.configure()`
time, even if only employed later on.
This is a part of #620
|
| |
|
|
|
|
|
|
|
|
| |
Also highlight the fact that the plugin can rely on the fetcher's
fetch() method getting called before consuming the next item in the
list, which is the magick behavior that the git plugin relies on.
This is a part of #620
|
|
|
|
|
|
| |
This was sitting in the section for abstract methods, but this
is most definitely not an abstract method to be implemented by
Sources.
|
|
|
|
|
|
| |
Added some comments to make the flow easier to follow, and
removed an annoying 'success' variabled in favor of a for / else
loop statement.
|
| |
|
|
|
|
| |
Fixes #597
|
|
|
|
|
|
|
|
|
| |
Issue was introduced by 171e803f (include directive) and the fix was
found courtesy of @Qinusty. This fixes also the include
feature. Because elements are to be serialized, the included fragments
need to use copy_tree when loaded.
Related to #470.
|
|
|
|
|
|
|
|
|
|
|
| |
`pip` source plugin can stage python packages that are either specified
directly in the element definition or picked up from `requirements.txt`
from previous sources. In order to support the latter use-case
(which is also the primary motivation for this plugin), this plugin
requires access to previous sources and hence is an example of a
Source Transform source.
Also, bump `BST_FORMAT_VERSION` as this patch adds a new core plugin.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Source plugin implementations can now specify that they need access to
previously staged sources by specifying
`BST_REQUIRES_PREVIOUS_SOURCES_TRACK` and/or
`BST_REQUIRES_PREVIOUS_SOURCES_FETCH`, corresponding to access at `track`
and `fetch` times respectively.
Fixes #381.
Replaces !505. For relevant discussion, see this discussion:
https://gitlab.com/BuildStream/buildstream/merge_requests/505#note_83780747
|
|
|
|
| |
Fixes #331.
|
|
|
|
|
| |
Since we have now backported this to `bst-1.2`, the APIs have
been introduced in 1.2 and not 1.4
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
**KLUDGE WARNING**: This involves making the source store its "meta"
object so that it's possible to create a copy of the source inside the
fetch queue, instead of back when the pipeline was being loaded.
This adds the SourceFetcher class, which is intended for sources that
fetch from multiple URLs (e.g. the git source and its submodules)
Fix when fetching
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a later plan to implement mirroring without forcing
everyone to update their sources. We use the expected calls to
Source.translate_url() when running Source.configure() to extract the
aliases from the URL. Multiple aliases must be extracted because
sources exist that may fetch from multiple aliases (for example, git
submodules)
Later, we want to substitute another URI where the alias normally reads
from the project - We accomplish this by re-instantiating the Source
with the alias overrides passed as an argument to the constructor.
|
|
|
|
|
|
| |
Since we backported the temporary/permanent failures patch for #397
into the `bst-1.2` branch, we need to adjust the since versions in master
down to 1.2.
|
|
|
|
|
|
|
|
|
|
|
|
| |
job.py: Changes to the logic surrounding retry attempts and child process return codes
element.py, source.py: ElementError and SourceError also implement this change.
These exceptions now have an optional parameter of temporary which defaults to false. This will potentially break
backwards compatibility where exceptions were previously raised and a retry was intended.
To trigger a retry, one must now raise their SourceError or ElementError with temporary=True.
This aims to fix #397.
|
|
|
|
| |
Fixes #424
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Giving main pages simple word titles
This makes the main page:
* About
* Installing
* Using
* Reference
* Contributing
o Now named all rst files with their parent page name as a prefix.
o Also changed some titles to make overall consistent titles.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
o _projectrefs.py: Additional constructor option to choose the base name
o _project.py: Load two ProjectRefs objects, one for the junctions
o source.py: Load and save junctioned source refs with the appropriate ProjectRefs object
o tests: Updated some tests to expect junctions to be stored in junction.refs
This fixes issue #361
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having the pipeline preflight all sources separately
from elements, have the element preflight it's sources.
This is in order to simplify the shared code path for the pipeline
and the loader to use for instantiating elements.
Also updated tests to expect the new ElementError and SourceError
instead of the PipelineError which was raised for preflighting before.
|
|
|
|
| |
This is a part of issue #285
|
|
|
|
|
| |
Added new Abstract Methods section here, and rearranged sources
such that abstract methods are on top.
|
|
|
|
|
|
|
|
| |
Recently after a refactor we kept the Source adding workspace keys
to the source keys because, now clean this up to have the workspace
key added directly in the Element cache key calculation.
This breaks cache keys.
|
|
|
|
| |
And Source no longer has any __workspace handle.
|
|
|
|
|
|
| |
source
And considering the workspace related edge cases in Element instead of Source.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the scheduled state of tracking from Sources, as
this is really an element wide thing.
To be consistent with assembly, now this comes with:
o Element._schedule_tracking()
o Element._tracking_done()
o Element.__tracking_scheduled
o Element.__tracking_done
Updated the TrackQueue() to call Element._tracking_done() similarly
to how we have BuildQueue() call Element._assemble_done().
|
|
|
|
|
|
|
| |
Element
Workspaces are now element wide, so consistency edge cases must
be handled at the element level instead of the source level.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And adjust all surrounding sources for changed symbols.
Additional details:
o Added Project.get_shell_config() to report the shell configuration,
instead of making those members all public
o Moved assertions about project specified format versions required
of plugins out of Plugin.__init__, and into Project.create_element()
and Project.create_source(), so we can keep more things private
This is a part of issue #285
|
|
|
|
|
|
| |
And adjust all surrounding sources for changed symbols.
This is a part of issue #285
|
|
|
|
|
|
|
|
|
|
| |
This was never particularly useful, there is no circumstances
under which a workspace needs to be deleted, and a cache key
invalidated, in the course of a session.
A workspace is deleted only atomically as a part of `bst workspace close`,
which does not even load a pipeline anymore, so the pipeline state need not
be adjusted in this case.
|
| |
|
|
|
|
| |
So we can report proper processed status from tracking queues
|
|
|
|
|
|
|
|
|
|
|
| |
The Source object previously stored the __origin_node,
__origin_toplevel and __origin_filename, this is from a time
when we did not hold on to the plugin's Provenance object
explicitly.
Since this information comes from the same place, let's just
use Plugin._get_provenance() to derive these values, instead
of redundantly carrying them along separately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new Source.load_ref() API which is technically optional to
implement, projects which make use of a project.refs file must only
use source plugins which implement the new load_ref() method.
* source.py: Added load_ref() API to load a ref from a specified node.
This also adds _load_ref() and _save_ref() wrappers which handle
the logistics of when to load and save a ref to which location.
This also fixes _set_ref() to apply the ref to the node unconditionally,
this must be done independantly of whether the ref actually changed.
o Modifications to the loading process such that Source now can have
access to the element name and source index.
o _pipeline.py: Delegate abstract loading of source refs to Source._load_ref()
- Print a summarized warning about redundant source references
- Assert that one cannot track cross-junction elements without project.refs.
o _scheduler/trackqueue.py: Delegate saving refs to Source._save_ref()
|
|
|
|
|
|
|
| |
This is technically an API break, but will be transparant for the
vast majority of the current hand full of source implementations
which exist at this time. This is a lesser evil than bloating the
API with new methods.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Source interrogation usually involves calling out to host tools
to quickly check if a given ref exists. This has however regressed
over time when running `bst build --track`.
This patch adds a new context manager to silence the messages,
and silences messages while calling `Source.get_consistency()`
Fixes #280
|
|
|
|
|
| |
Equivalent to the 'elements' field, but slightly different because
sources don't have accompanying yaml.
|
| |
|
|
|
|
| |
Fixes #250
|
|
|
|
|
|
|
| |
In case a source with an open workspace is tracked and it's ref gets
updated, BuildStream should inform the user that the new ref will not be
picked up so long as the workspace is open. To start using the updated
ref, the existing workspace will have to be closed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This functionality is only supported for sources which have an open
workspace. When such sources are present, the workspace directory will
be mounted directly inside the sandbox. As opposed to the default
behavior, which is to copy files inside the sandbox.
This will save time when building large projects as only those files
will need be re-compiled that have been modified during two consecutive
builds (assuming the underlying build system supports such behavior).
A few things to note regarding this behavior:
- If there are any `configure-commands` present, they will run only once
for each open workspace. If an element has multiple workspaces and any
one of them is opened/closed, they will be executed again on the next
run. But, modifying the contents of a workspace will not trigger the
`configure-commands` to be executed on the next run.
- Workspaced builds still leverage the cache. So, if no changes are made
to the workspace, i.e. no files are modified, then it will not force a
rebuild.
Fixes #192.
|