summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests/sourcecache/push.py: Less strict initialisation checkjennis/fix_failing_testJames Ennis2019-06-061-2/+2
| | | | | | | | When we are testing push failures, we are being too strict when we try to verify that the remote has failed to be initialized. The assertion was failing because of slightly different gRPC error messages. Now the assertion is less strict but still appropriate.
* Merge branch 'aevri/defensive_send_message' into 'master'bst-marge-bot2019-06-062-32/+38
|\ | | | | | | | | _scheduler/jobs: refactor, defensive send_message See merge request BuildStream/buildstream!1373
| * _scheduler/jobs: refactor, defensive send_messageAngelos Evripiotis2019-06-062-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | Simplify the custom 'handle_message' / 'send_message' protocol by not requiring a message_type. These message types share a namespace with the base Job implementation, which could cause trouble. Introduce a new private '_send_message' to implement the old functionality. Subclasses are free to pack a message type into their own messages, this isn't necessary at present and simplifies existing subclass code.
| * jobs/job: lint fixes, overhang + unused varAngelos Evripiotis2019-06-061-2/+2
|/
* Merge branch 'bschubert/pylint-integration' into 'master'bst-marge-bot2019-06-0624-46/+116
|\ | | | | | | | | Ensure pylint runs in tests/integration See merge request BuildStream/buildstream!1376
| * tests/integration: add __init__.py file to make it a packagebschubert/pylint-integrationBenjamin Schubert2019-06-061-0/+0
| | | | | | | | | | | | | | | | tests/integration was lacking a __init__.py file, meaning it was not recognized as a python package, and thus, pylint would not check anything inside the directory. Adding __init__.py ensures we have correct checks here.
| * tests/integration: Fix mutable default argumentsBenjamin Schubert2019-06-062-2/+11
| | | | | | | | | | | | Python method default arguments should never be mutable. Using 'None' as a canary and setting them afterwards instead.
| * tests/integration/shell: Simplify if-else assignmentBenjamin Schubert2019-06-061-4/+1
| | | | | | | | Pylint was complaining about it.
| * test/integration: Fix 'wrong-import-order' pylint issuesBenjamin Schubert2019-06-063-7/+11
| |
| * tests/integration: Fix all 'unused-import' errorsBenjamin Schubert2019-06-063-9/+0
| |
| * tests/integration: Disable 'unused-import' checks that are pytest fixturesBenjamin Schubert2019-06-0623-25/+25
| | | | | | | | | | | | | | Some imports are fixtures, that need to be in the current namespace when pytest runs. However, pylint does not know this. Disabling pylint checks on those imports
| * tests/integration: Silence all 'redefined-outer-name' pylint errorsBenjamin Schubert2019-06-0623-0/+69
|/ | | | | | | | | | This is due to pytest fixtures having to be named the same as the test arguments. This is a pre-requisite to enable pylint on this directory We need to do this per file as we can't blanket disable for directories. See upstream issue: https://github.com/PyCQA/pylint/issues/618
* Merge branch 'bschubert/pylint-fixes' into 'master'James Ennis2019-06-0610-10/+30
|\ | | | | | | | | Ensure pylint runs in some tests paths See merge request BuildStream/buildstream!1378
| * tests/plugins: Enable pylint and fix problemsbschubert/pylint-fixesBenjamin Schubert2019-06-053-2/+7
| | | | | | | | | | tests/plugins was missing an __init__.py, which meant pylint was never run there.
| * tests/remoteexecution: Enable pylint and fix problemsBenjamin Schubert2019-06-053-2/+8
| | | | | | | | | | tests/remoteexecution missing an __init__.py, which meant pylint was never run there.
| * tests/sandboxes: Enable pylint and fix problemsBenjamin Schubert2019-06-054-6/+15
|/ | | | | tests/sandboxes was missing an __init__.py, which meant pylint was never run there.
* Merge branch 'bschubert/cythonize-valid-char-names' into 'master'bst-marge-bot2019-06-054-32/+59
|\ | | | | | | | | _loader/loader: cythonize valid_chars_name See merge request BuildStream/buildstream!1371
| * _loader/loader: cythonize valid_chars_nameBenjamin Schubert2019-06-054-32/+59
|/ | | | | | | | | - Create a new _loader/utils.pyx cython module for functions cythonized in the loader module. - Move valid_chars_name from loader to utils and cythonize. This function is called extensively, and easy to extract
* Merge branch 'raoul/1025-legacy-remotes' into 'master'bst-marge-bot2019-06-0514-320/+459
|\ | | | | | | | | | | | | Improved handling of legacy remotes Closes #1025 See merge request BuildStream/buildstream!1366
| * Improve legacy artifact remote handlingRaoul Hidalgo Charman2019-06-053-7/+45
| | | | | | | | | | | | | | | | | | This creates a new ArtifactRemote class, derived from CASRemote that extends initialisation to check for an artifact service. This drops the remote early rather than raising an error on method not found each time it tries to use it. Fixes #1025
| * _protos: Add new status method to artifact serviceRaoul Hidalgo Charman2019-06-053-3/+110
| | | | | | | | | | | | And update relavant grpc files. Part of #1025
| * _protos: Update generated pb2 filesRaoul Hidalgo Charman2019-06-059-310/+304
|/
* Merge branch 'aevri/split_jobs_parent_child' into 'master'bst-marge-bot2019-06-054-73/+218
|\ | | | | | | | | Split ChildJob out from Job class See merge request BuildStream/buildstream!1334
| * _scheduler/jobs/job: elaborate on 'simple' objectsAngelos Evripiotis2019-06-051-5/+12
| |
| * _scheduler/jobs/job: refactor, use send_messageAngelos Evripiotis2019-06-051-7/+5
| |
| * _scheduler/jobs/job: document send_messageAngelos Evripiotis2019-06-051-3/+13
| |
| * _scheduler/jobs: split jobs into parent and childAngelos Evripiotis2019-06-054-62/+195
| | | | | | | | | | | | | | | | | | | | Make it clearer what happens in which process by splitting out a 'ChildJob', which encapsulates the work that happens in the child process. This also makes it possible to control what is transferred to the child process. This is very useful for adding support for the 'spawn' method of creating child processes as opposed to the 'fork' method.
| * cachesizejob: remove redundant child_process_dataAngelos Evripiotis2019-06-051-3/+0
| | | | | | | | This just does the default behaviour, clearer to remove it.
| * jobs/job: Add a fullstop to Job explanationAngelos Evripiotis2019-06-051-1/+1
|/
* Merge branch 'bschubert/optimize-node_get' into 'master'bst-marge-bot2019-06-0411-77/+71
|\ | | | | | | | | Optimize _yaml.node_get See merge request BuildStream/buildstream!1370
| * _yaml: Optimize node_get to not create dummy Nodes unnecessarily.bschubert/optimize-node_getBenjamin Schubert2019-06-031-8/+8
| | | | | | | | | | This reduces considerably the number of nodes created and thus speeds up the calls to node_get.
| * _yaml.pyx: Forbid expected_type=Mapping, and remove isinstance checkBenjamin Schubert2019-06-0311-69/+63
|/ | | | | | | | | | | Calls to `isinstance` can be particularily costly. Using type() is much faster. The only known case where the `isinstance` was useful is for dictionnaries where we would ask for a 'Mapping' instead. Disallowing 'Mapping' for expected_type considerably speeds up the calls to this functions. Also add into NEWS
* Merge branch 'bschubert/fix-cython-trace' into 'master'bst-marge-bot2019-06-031-1/+6
|\ | | | | | | | | setup.py: Be more restrictive with BST_CYTHON_TRACE values See merge request BuildStream/buildstream!1368
| * setup.py: Be more restrictive with BST_CYTHON_TRACE valuesbschubert/fix-cython-traceBenjamin Schubert2019-06-031-1/+6
|/ | | | | | "0" evaluates to 'True' in python, which incorrectly switched on the BST_CYTHON_TRACE. Forcing an int for this environment variable allows us to ensure we are correct.
* Merge branch 'bschubert/cython-disable-linetrace' into 'master'bst-marge-bot2019-05-311-4/+5
|\ | | | | | | | | Setup.py: Disable linetrace by default and only enable when using coverage See merge request BuildStream/buildstream!1367
| * Setup.py: Disable linetrace by default and only enable when using coverageBenjamin Schubert2019-05-311-4/+5
|/ | | | | | | | | It turns out that enabling 'linetrace', does have a runtime cost even if not enabled in distutils. Therefore disabling it by default. In order to run coverage, we therefore need to retranspile the .pyx files with ENABLE_CYTHON_TRACE set.
* Merge branch 'raoul/1024-artifact-docs' into 'master'bst-marge-bot2019-05-316-39/+118
|\ | | | | | | | | | | | | Update docs regarding artifact and source caches Closes #1024 See merge request BuildStream/buildstream!1362
| * docs: Update configuring cache serverraoul/1024-artifact-docsRaoul Hidalgo Charman2019-05-314-33/+40
| | | | | | | | | | | | | | | | Now that we have both artifact and source caches the documentation is updated to reflect that. Some sections headings/links etc. have been expanded and changed. Part of #1025
| * doc: Add architecture section on cachesRaoul Hidalgo Charman2019-05-313-0/+71
| | | | | | | | Part of #1024
| * docs: update to reflect artifact as a protoRaoul Hidalgo Charman2019-05-311-6/+7
|/ | | | Part of #1024
* Merge branch 'danielsilverstone-ct/iterative-loader-bits' into 'master'bst-marge-bot2019-05-302-27/+65
|\ | | | | | | | | Make more parts of the loader iterative See merge request BuildStream/buildstream!1365
| * _loader/loade{r,lement}.py: Do not re-collect already collected elementsdanielsilverstone-ct/iterative-loader-bitsDaniel Silverstone2019-05-302-4/+12
| | | | | | | | | | | | | | When multiple top level elements are specified we need to keep track of whether we have completed the iterative collection process. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * loader.py: Make _collect_element() iterativeDaniel Silverstone2019-05-301-14/+41
| | | | | | | | | | | | | | To reduce stack usage during load, make the LoadElement to MetaElement conversion be iterative. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * loader.py: Make _sort_dependencies() a static iterative methodDaniel Silverstone2019-05-301-10/+13
|/ | | | | | | | The _sort_dependencies() method does not need to be an instance method, nor does it need to be recursive. This fixes both of those things which can get us closer to being able to cythonize the loader. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'danielsilverstone-ct/iterative-circdeps' into 'master'bst-marge-bot2019-05-301-34/+39
|\ | | | | | | | | Rewrite `Loader._check_circular_deps()` to be iterative See merge request BuildStream/buildstream!1364
| * loader.py: Rewrite _check_circular_deps() to be iterativeDaniel Silverstone2019-05-301-34/+38
| | | | | | | | | | | | | | | | In an effort to reduce the places where the stack might be a problem as we Cythonize things, rewrite the circular dependency checker to be iterative. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * loader.py: Make _check_circular_deps() staticDaniel Silverstone2019-05-301-2/+3
|/ | | | | | | | This did not need to be an instance method, making it static might improve performance and definitely makes it clear that it's not actually bound to the loader instances. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'bschubert/cython' into 'master'bst-marge-bot2019-05-3015-357/+725
|\ | | | | | | | | Introduce Cython for better performances See merge request BuildStream/buildstream!1350
| * _yaml: Replace strings by a C enum for Representer states.bschubert/cythonBenjamin Schubert2019-05-301-44/+57
| | | | | | | | | | This allows for a quicker comparison while keeping a good readability of the code
| * _yaml: rework SYNTHETIC_COUNTER to be a C functionBenjamin Schubert2019-05-291-12/+15
| | | | | | | | | | | | | | The `SYNTHETIC_COUNTER` is an iterator that is called a lot in _yaml, one for each synthetic node. Cython is not able to optimize `itertools.counter` well enough. Providing a custom C function allows to reduce the amount of python code called in this critical codepath