| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Hardcodes the default min version as "2.0", instead of using a function.
(The function was causing an ImportError during tab completion,
because it attempts to import "__version__", which isn't available
at tab completion time.)
|
|
|
|
|
|
|
|
| |
Allows user to supply a directory name ending in '.bst' for "bst
artifact checkout", without buildstream removing '.bst' from the end.
(It's only supposed to remove '.bst' if the user didn't supply a
directory name, and buildstream is auto-generating a name based on the
target name.)
|
|
|
|
|
| |
This moves all implementations of 'start_time' into a single place
for easier handling and removing roundtrips of notifications
|
|
|
|
|
| |
This copies a dictionary before it gets expanded, which is not necessary
since the expansion will not keep the dictionary as is
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of passing around many details though calling signatures
throughout the loader code, create a single LoadContext object
which holds any overall loading state along with any values which
are constant to a full load process.
Overall this patch does:
* _frontend/app.py: No need to pass Stream.fetch_subprojects() along anymore
* _loader/loadelement.pyx: collect_element_no_deps() no longer takes a task argument
* _loader/loader.py: Now the Loader has a `load_context` member, and no more
`_fetch_subprojects` member or `_context` members
Further, `rewritable` and `ticker` is no longer passed along through all
of the recursing calling signatures, and `ticker` itself is finally removed
because this has been replaced a long time ago with `Task` API from `State`.
* _pipeline.py: The load() function no longer has a `rewritable` parameter
* _project.py: The Project() is responsible for creating the toplevel
LoadContext() if one doesn't exist yet, and this is passed through
to the Loader() (and also passed to the Project() constructor by the
Loader() when instantiating subprojects).
* _stream.py: The `Stream._fetch_subprojects()` is now private and set
on the project when giving the Project to the Stream in `Stream.set_project()`,
also the Stream() sets the `rewritable` state on the `LoadContext` at the
earliest opportunity, as the `Stream()` is the one who decides this detail.
Further, some double underscore private functions are now regular single
underscores, there was no reason for this inconsistency.
* tests/internals/loader.py: Updated for API change
|
| |
|
|
|
|
|
|
|
|
|
| |
When closing a workspace while the `workspace close` command was issued
from the closed workspace, we go to great lengths to inform the user
that they can no longer run bst commands from the closed workspace directory.
This is not worthwhile, the user will know this the next time they run
`bst` anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verifying for variables (all used variables defined and no cycle) is
much faster than flattening them. It also uses much less memory. Only
`bst show -f "%{vars}"` requires to flatten all variables. For other
cases we can improve performance by only checking rather than
flattening.
Also flattening very nested variables could lead to very long lists of
empty strings. The memory usage for flattening could be a lot bigger
than the resulting value. Force flattening and caching every
variable definitions can improve intermediate memory consumption and
only consume memory of the size of the result.
Finally, an optimization allowed inifinite cycles leading to
segmentation fault. This was solved by simplifying the code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we split up the logic of how to load plugins from different
origins into their respective classes.
This commit also:
o Introduces PluginType (which is currently either SOURCE or ELEMENT)
o Reduces the complexity of the PluginFactory constructor
o Kills the loaded_dependencies list and the all_loaded_plugins API,
and replaces both of these with a new list_plugins() API.
Consequently the jobpickler.py from the scheduler, and the
widget.py from the frontend, are updated to use list_plugins().
o Split up the PluginOrigin implementations into separate files
Instead of having all PluginOrigin classes in pluginorigin.py, split
it up into one base class and separate files for each implementation,
which is more inline with BuildStream coding style.
This has the unfortunate side effect of adding load_plugin_origin()
into the __init__.py file, because keeping new_from_node() as
a PluginOrigin class method cannot be done without introducing a
cyclic dependency with PluginOrigin and it's implementations.
|
|
|
|
|
|
|
|
| |
Use non-greedy search to ensure that we stop at the next closing brace.
Otherwise, for a string like `%{variable} {variable}`, the second
variable will also get substituted.
Fixes #1307.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This can be quite handy when one is preparing to open a build shell.
This originally came up in
https://gitlab.com/BuildStream/buildstream/-/issues/685#note_105460896.
|
|
|
|
| |
This is no longer needed now that we support caching buildtrees in CAS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* "min-version" is specified as a <major>.<minor> point version
and uses the installed BuildStream version instead of having
a separate versioning number for the format.
* The presence of "format-version" is now used to indicate
that we might be loading a BuildStream 1 project.
* For now, where parsing the version at startup is concerned, and
also where `bst init` is concerned, we artificially bump the
detected BuildStream version to 2.0 if we detect a version < 2.0,
these exceptions can be removed once 2.0 is tagged and released.
Summary of changes:
_project.py: Now parse "min-version" and detect "format-version" to
warn about loading a BuildStream 1 project
_versions.py: Remove obsolete BST_FORMAT_VERSION numbers from here
data/projectconfig.yaml: Remove old "format-version" from defaults
utils.py: Added new private _parse_version() helper function, and another
_get_bst_api_version() to get an adjusted API version.
frontend/app.py, frontend/cli.py: Updated `bst init` implementation
testing (buildstream.testing): Updated testing utilities to generate
and use projects with min-version instead of format-version.
tests and examples: Updated to use min-version across the board.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Sphinx does not allow sections within docstrings so convert the
"FORMAT" heading into bold text. See
https://sphinx-dev.narkive.com/7rqrxjgL/headings-in-docstrings for
some related discussion on this issue.
* Sphinx uses double backticks for code samples so fix that for CLI
options.
* Fix a typo.
Fixes #323.
|
|
|
|
|
|
|
| |
Plugin tests are already accessing this API, but using imports from
private modules. For motivation for this to be exposed publicly, note
that ErrorDomain is an argument for most things in runcli.py, and
LoadErrorReason may be another.
|
|
|
|
|
|
|
| |
Ensure that if a buildtree isn't cached locally, it's only fetched
if --pull and pull-buildtrees config are set. Also, only attempt to
fetch if it's plausible that it could be pulled, with appropriate
messaging based on local cached state.
|
|
|
|
|
|
|
| |
This replaces the _get_consistency method by two methods:
`_has_all_sources_resolved` and `_has_all_sources_cached` which allows
a more fine grained control on what information is needed.
|
|
|
|
|
|
| |
'_source_cached' is not explicit enough as it doesn't distinguishes
between sources in their respective caches and sources in the global
sourcecache.
|
|
|
|
| |
Also highlight the change & configuration in NEWS
|
| |
|
|
|
|
|
|
| |
The default exception handler of the async event loop bypasses
our custom global exception handler. Ensure that isn't the case,
as these exceptions are BUGS & should cause bst to exit.
|
|
|
|
|
| |
Instead output "junction" in magenta for info. Also include test
in format/junctions.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PipelineSelection is one of the few stringy types that weren't
converted to FastEnum, presumably because we lacked a mechanism for
only allowing a sub-set of options as CLI arguments.
We've re-designed this since, and as part of the UI/UX refactor we'd
like to generally clean this, but that is probably still a while out.
Since that hasn't happened, for now, this adds a feature to the
FastEnumType that allows specifying only a subset of values is allowed
for a specific command, so that we can use the type as a proper
enum.
We also get rid of a number of accidental uses of strings, and move
PipelineSelection to buildstream.types so that we don't have a
significant import overhead for it.
|
|
|
|
|
| |
We don't have many of the `--track` options anymore, so we can remove
handling for them in parts of the code that don't need it.
|
| |
|
| |
|
|
|
|
|
|
|
| |
As discussed over the mailing list, reformat code using Black. This is a
one-off change to reformat all our codebase. Moving forward, we
shouldn't expect such blanket reformats. Rather, we expect each change
to already comply with the Black formatting style.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we store color configuration in our App object, and have to
remember to pass it around to `click.echo()` when printing things on the
screen. This is error-prone as we can forget to do so. This leads to
bugs like #1200, where `bst init` was not respecting `--no-colors` flag.
Instead of doing that, this patch controls colors in output by
configuring the `click.Context` object.
Fixes #1200.
|
|
|
|
|
|
|
|
|
| |
This is to catch an error when sometimes the readline buffer of stdin
gets corrupted during the second CTRL-C we send, and leads to having
BuildStream hand and throw a SystemError.
Catching the SystemError and treating as a click.Abort doesn't seem
to have adverse effects.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BREAKING CHANGE: Remove all tracking related options and flags from
`bst build` command, as discussed on mailing list previously.
See
https://mail.gnome.org/archives/buildstream-list/2019-October/msg00009.html
for the original proposal, and
https://mail.gnome.org/archives/buildstream-list/2019-October/msg00024.html
for a summary.
At the same time, remove use of the removed options from our test suite.
|
|
|
|
|
|
|
| |
At somepoint action_name instead of complete_name started to be
rendered to the user for the dynamic list of queue status reports.
As we now have more of a UI seperation between 'Artifact' & 'Source'
tasks, it also makes sense to reflect these actions in this output.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow situations where the start method is already set, this enables us
to use this in testing situations.
Also, print a diagnostic if it's already set to something we didn't
want.
Now this block got more complex, split out into a new function.
Now we're using this string a lot, extract it to a variable, to make
sure we're spelling it correctly everywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work around the fact that we can't import 'fcntl' on Windows, and
confine the workaround to as small a scope as we can.
This enables us to run at least these commands on Windows:
bst help
bst init
We can't run any commands that require a Platform object though, which
is most commands.
|
|
|
|
|
|
|
|
|
| |
This caused stacktraces when a user didn't have buildbox-casd
installed, even though it wasn't required for completion, even for
artifacts.
It does add a slightly ugly parameter to Context, long-term it might
make sense to create a special slimmed-down context for completion.
|
|
|
|
|
|
|
| |
This patch ensures checkout behaves like the rest of our
commands which support --deps options. That is, we carry
the "deps" string through to the Stream and load the
corresponding PipelineSelection.
|
|
|
|
|
|
|
|
| |
source checkout supports --deps all, so we should be
consistent.
Additionally, a user may want to have build deps in a
potential chroot so you could rebuild any component.
|
|
|
|
|
|
|
|
|
| |
!1451 introduced the --compression option to bst artifact checkout.
This MR is a step towards making the commands more symmetric,
and introduces the --compression option to bst source checkout
Now we're compressing, we must explicitly close the tarball
once we're done writing to it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR changes the behaviour of source checkout so that it is more
like artifact checkout. That is, a --directory option can be provided,
rather than a mandatory LOCATION.
In addition to this, the --tar option is no longer a boolean flag,
rather it expects a tarfile name (just like artifact checkout)
The appropriate tests have also been altered so that they support
the new API
|
| |
|
|
|
|
|
| |
This option sets the default value for the `--deps` option of
`bst build`.
|
|
|
|
|
|
|
|
|
| |
Add a notifcation for RETRY. This moves the retry handling into
scheduler, which will be running in the process which has been
suspended for interactivity and as such will be able to load the
relevant Element. Note a failed job via the scheduler should never
not have a related queue, so the try except when matching the queue
via the action name should not be needed.
|
|
|
|
|
|
|
|
| |
Currently we don't format the terminator to the displayed widget for a
StatusJob, which means that we have blue brackets apart from the
terminating one, which is white.
This is a trivial patch to fix this.
|
|
|
|
| |
cleanup help msgs
|
|
|
|
|
|
|
|
|
|
|
| |
In the latest released version of pylint (2.3.x), the
"no-else-raise" (R1720) warning has been introduced.
See:
http://pylint.pycqa.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-3-0
There are many instances of this in our codebase, which this
patch addresses.
|