| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| |
| |
| | |
jobs/job: send ChildJob the context, not scheduler
See merge request BuildStream/buildstream!1407
|
|/
|
|
|
|
|
| |
Instead of passing the whole scheduler to the ChildJob, only pass the
part that is used - the context. Reducing the amount of shared state
makes it easier to follow what's going on, and will make it more
economical to move to away from the 'fork' model later.
|
|\
| |
| |
| |
| | |
enable PyLint "arguments-differ" error, and fixup complaints
See merge request BuildStream/buildstream!1390
|
| |
| |
| |
| |
| |
| | |
Don't return, instead of returning 'the result' of os.unlink - it also
doesn't return anything (and neither does the semantically identical
os.remove).
|
| | |
|
| |
| |
| |
| |
| | |
Ignore the warning for `_init_project_interactive`, as we really don't
care what the arguments are.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update OptionEnum and OptionFlags to match the Option base-class.
Introduce 'load_special' to allow explicit usage of extended
functionality, which wouldn't necessarily be supported by different
subclasses.
By making the signatures of overridden methods deliberately match, we
can use PyLint to ensure the signatures don't accidentally differ.
Also replace `super(cls, self)` with the equivalent and less error-prone
`super()`, wherever we've touched it. In separate work we may want to
replace this across the project.
We must introduce __init__() functions for OptionEnum and OptionFlags to
get a clean pass from PyLint. It seems that it's unable to see that
load_special() is also transitively called from __init__().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update 'source_config' of Git and _SimpleGit to match the Repo base
class. This ensures that they are fully substitutable Repos.
Introduce 'source_config_extra' to allow explicit usage of extended
functionality, which wouldn't necessarily be supported by a different
subclass.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update 'run' to match the base class. This ensures that it is a fully
substitutable sub-class.
Introduce 'run_project_config' to allow explicit usage of extended
functionality, which wouldn't necessarily be supported by a different
subclass.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
Since we're already relying on `kwargs['project']` succeeding, enforce
that run_project_config() only takes keyword arguments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update import_single_file and export_to_tar to match the Directory base
class. This ensures that FileBasedDirectory is a fully substitutable
Directory.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update import_single_file and list_relative_paths to match the Directory
base class. This ensures that CasBasedDirectory is a fully substitutable
Directory.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
|
| |
| |
| |
| |
| |
| |
| | |
Update signatures of SafeHardlinkOps methods to match the
fuse.Operations base class. This helps ensure there's no confusion about
what the arguments are for, and that SafeHardlinkOps can actually be
substituted for any other Operations subclass.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the base-class fuse.Operations class match the subclass
SafeHardlinkOps.
Remove the complication of worrying about raw_fi mode - we already
rely on it being inactive.
Remove ambiguity from FUSE.create() - we only support the non-raw_fi
case. In separate work, we may want to remove raw_fi completely.
Update Operations.create() to use a 'flags' param explicitly, rather
than the more confusing dual-meaning of the 'fi' param.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Get consistency between the Operations base class and the
SafeHardlinkOps subclass.
Use the 'target, source' convention as it appears in Operations.
This avoids the confusion of 'target' changing meaning in the
'name, target' convention introduced by SafeHardlinkOps. The naming is
also consistent with 'man ln', and more consistent with Python's
equivalent functions.
Unfortunately FUSE.link() and Operations.link() swap the order of
'target' and 'source', but the meaning is the same.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PyLint helpfully points out that _GitMirror.fetch() does not match
SourceFetcher.fetch() - it is missing the *kwargs argument. The same for
_GitSourceBase.track().
Move towards being able to enable the 'arguments-differ' error faster
by side-stepping the class design debate and ignoring the error for now.
Change _GitSourceBase.set_ref() argument names to match
Source.set_ref().
|
|/
|
|
|
|
|
|
|
| |
Make the signature of LogFile.render() match Widget.render() by making a new
LogFile.render_abbrev() method with the extra functionality. Fix up the
single call site to use that instead.
This means that we won't get linter warnings that helpful inform us that
Widgets are not really substitutable.
|
|\
| |
| |
| |
| | |
_platform.get_cpu_count: use psutil instead of os
See merge request BuildStream/buildstream!1394
|
|/
|
|
|
|
|
|
| |
Be Windows-friendly by using the portable
`psutil.Process().cpu_affinity()` instead of `os.sched_getaffinity`.
Note that unfortunately this still doesn't work on Mac, so we keep that
platform-specific override.
|
|\
| |
| |
| |
| | |
tests/frontend/pull.py: Fix typo
See merge request BuildStream/buildstream!1404
|
|/ |
|
|\
| |
| |
| |
| | |
Make ErrorDomain a unique enumeration
See merge request BuildStream/buildstream!1399
|
|/
|
|
|
|
|
|
| |
For some reason PROG_NOT_FOUND and APP were both under 12 which could be
confusing. Changed PROG_NOT_FOUND to 16 and added a unique decorator to
prevent this from happening again.
Updated shellbuildtrees test to check correct error domain.
|
|\
| |
| |
| |
| | |
_scheduler/scheduler.py: Remove unused elapsed_time() calls
See merge request BuildStream/buildstream!1398
|
|/
|
|
|
|
| |
Both run() and the App callback _ticker_callback() call & return
elapsed_time(), which is the unused by the respective callers and
as such is unnecessary.
|
|\
| |
| |
| |
| | |
cascache.py: Remove unused methods commit() and _commit_directory()
See merge request BuildStream/buildstream!1395
|
|/ |
|
|\
| |
| |
| |
| | |
utils._get_volume_size: use shutil.disk_usage
See merge request BuildStream/buildstream!1393
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is win32-friendly, less to read, and fixes a latent bug.
Avoid dealing with low-level platform specifics by using the
higher-level shutil.disk_usage() function to calc total and available
bytes for us.
shutil is also more correct - it uses f_frsize to convert from blocks to
bytes, instead of f_bsize. I verified that the numbers match with the
output from `df -k`, whereas the old implementation did not. Here are
the meanings from `man statvfs`:
f_frsize The size in bytes of the minimum unit of allocation on
this file system. (This corresponds to the f_bsize
member of struct statfs.)
f_bsize The preferred length of I/O requests for files on this
file system. (Corresponds to the f_iosize member of
struct statfs.)
Link to shutil.disk_usage() implementation:
https://github.com/python/cpython/blob/3.5/Lib/shutil.py#L980
|
|\
| |
| |
| |
| | |
Refactor 'super(cls, self)' -> 'super()'
See merge request BuildStream/buildstream!1391
|
|/
|
|
|
|
|
|
|
|
| |
For most use-cases with modern Python, it's not necessary to supply the
'type' or 'object-or-type' arguments to super().
Replace all our instances with arg-less super, which is less
error-prone.
https://docs.python.org/3.5/library/functions.html#super
|
|\
| |
| |
| |
| |
| |
| | |
tests: Build wheel before installing BuildStream in overnight tests
Closes #1045
See merge request BuildStream/buildstream!1388
|
|/
|
|
|
|
|
| |
BuildStream now requires setuptools and cython when building the wheel
and thus can't be installed directly with pip install --no-index.
Building a wheel beforehand allows us to install without dependencies.
|
|\
| |
| |
| |
| | |
plugins/sources: Remove 'or None' call that will never be true
See merge request BuildStream/buildstream!1387
|
|/
|
|
|
| |
Since node_get_member has a default value passed in, it is impossible
for the method to return 'None'
|
|\
| |
| |
| |
| | |
rewrite _extract_depends_from_node in Cython and optimize
See merge request BuildStream/buildstream!1383
|
| |
| |
| |
| |
| | |
range() and access to the list can be optimized better by cython than
the enumerate() call.
|
| |
| |
| |
| |
| |
| |
| | |
We need to call this function three times in a row then concatenate the
three results.
Using an accumulator is slightly faster.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
extract_depends_from_node has two different behaviors depending on
whether it is calling itself or something else is calling it.
Extracting the inner calls to a helper function helps speed up the code
and makes it more understandable.
|
|/
|
|
|
|
|
|
|
|
|
| |
extract_depends_from_node is only depending on things declared in types,
loadelement doesn't have any dependency on it. It makes more sense to
have it in types.pyx.
Moreover, this allows us to cythonize the function, reducing its total
runtime impact.
- _yaml: expose node_del as public api for Cython
|
|\
| |
| |
| |
| | |
Make the Node api stricter, by only accepting nodes
See merge request BuildStream/buildstream!1384
|
| |
| |
| |
| |
| | |
Also update documentation in plugin for APIs that do accept Node and
not `dict`.
|
| |
| |
| |
| |
| | |
By being more restrictive when creating new nodes, we can remove
checks for not-node values.
|
| |
| |
| |
| |
| | |
This is to restrict the API to always work with nodes in order to
sanitize the API
|
|/
|
|
|
| |
In order to move to a cleaner Node api, we need to ensure that what we
are treating is correctly set up as being Nodes.
|
|\
| |
| |
| |
| | |
testing/_utils/site.py: Fix missing BZR assignment
See merge request BuildStream/buildstream!1385
|
|/
|
|
|
|
| |
Ensure that BZR is assigned to None in exception handling when
not available on the host. Needed for tests/testutils/repo/bzr.py
import.
|
|\
| |
| |
| |
| |
| |
| | |
Push based pipeline
Closes #1002 and #943
See merge request BuildStream/buildstream!1344
|