summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* doc/source/install.rst: Mention bwrap version requirementsmilloni/assert-bwrap-versionmilloni2018-04-111-0/+1
|
* setup.py: Assert Bubblewrap versionmilloni2018-04-111-4/+35
| | | | | The required version is 0.1.2 based on the fact that we're using --hostname and --remount-ro.
* _frontend/widget.py: Correct log line if logdir is emptyjmac/logfile-widget-correctionJim MacArthur2018-04-101-2/+3
|
* _workspaces.py: Assert that configuration is only saved in the main process.Tristan Van Berkom2018-04-101-0/+2
|
* Serialize workspace modifications in the main process.Tristan Van Berkom2018-04-103-19/+64
| | | | | | | | | | | | | This patch makes the child process send any workspace state back to the main process and saves it there directly before processing the result of a build job, such that workspace modifications in child tasks work transparently and no special care needs to be taken to save them except when doing so in the main process. Also this removes the line where we update workspace data at staging time. This fixes issue #352
* utils.py: Added _is_main_process()Tristan Van Berkom2018-04-101-0/+12
| | | | | A helper function to identify if we are running in the main process or not.
* _workspaces.py: Added Workspaces.update_workspace()Tristan Van Berkom2018-04-101-0/+42
| | | | | | | | This takes a serialized workspace dictionary as understood by Workspace.from_dict() and created by Workspace.to_dict() Further, this adds a Workspace.differs() method to compare the state of two workspace instances.
* _workspaces.py: Add generic serialization/deserializationTristan Van Berkom2018-04-101-21/+56
| | | | | Also streamline the instantiation code paths to layer the yaml parsing on top of simple dictionary deserialization.
* _workspaces.py: Remove knowledge of Elements completelyTristan Van Berkom2018-04-104-65/+50
| | | | | | | | | | | | | This makes workspaces more cleanly separated from everything else. o Removed some methods from Workspace() o Added Element._open_workspace() to initialize workspaces on sources o Cleanup some code in the pipeline o Have the App() call Element._open_workspace() instead of Workspace.open()
* element.py: Removed useless __workspace pointerTristan Van Berkom2018-04-101-1/+0
| | | | I added this in the last refactor and forgot to remove it.
* tests/frontend/workspace.py: Test that we detect modifications made to a ↵352-race-condition-incorrect-saving-of-running-files-in-workspaces-yml-local-state-file311-opening-a-workspace-with-a-cached-buildTristan Van Berkom2018-04-091-0/+77
| | | | | | | workspace This was previously only working for added or removed files and broken for modified files.
* _workspaces.py: Fix cache key calculation regressionTristan Van Berkom2018-04-091-1/+1
| | | | This was regressed in the refactor done in commit f761140f
* element.py, source.py: Element consumes the rest of workspace logic.Tristan Van Berkom2018-04-093-61/+45
| | | | And Source no longer has any __workspace handle.
* element.py, source.py: Removing knowledge of assemble scheduling state from ↵Tristan Van Berkom2018-04-092-41/+8
| | | | | | source And considering the workspace related edge cases in Element instead of Source.
* element.py: Manage scheduled tracking state in ElementTristan Van Berkom2018-04-093-21/+21
| | | | | | | | | | | | | | | 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.py: Factored out pointless extra Element._workspaced() methodTristan Van Berkom2018-04-092-13/+6
|
* element.py: Cache source consistency logic and refactor workspace logic into ↵Tristan Van Berkom2018-04-096-47/+55
| | | | | | | Element Workspaces are now element wide, so consistency edge cases must be handled at the element level instead of the source level.
* tests/frontend/workspace.py: Fixed test_build to make the right assertionTristan Van Berkom2018-04-091-1/+1
| | | | | | This was removing a file from the workspace, building, checking out, and then asserting that the file is *still gone* in the workspace, ignoring the same file in the checkout.
* _ostree.py: Mention the remote URL when we fail to fetch remote refsJim MacArthur2018-04-091-1/+2
|
* _versions.py: Fixed copyright year on newly added file.Tristan Van Berkom2018-04-081-1/+1
| | | | Oops.
* NEWS: Adding news entry for new `bst init` commandTristan Van Berkom2018-04-081-0/+7
|
* _frontend/app.py: Automatically launch interactive `bst init` when ↵Tristan Van Berkom2018-04-081-1/+13
| | | | | | | | | | project.conf is absent When running a command where a project.conf does not exist, ask the user if they would like to interactively create a project in the said directory. This is a part of issue #342
* More specific exceptions when a project.conf is missing.Tristan Van Berkom2018-04-084-7/+18
| | | | | Since we want to react and start an interactive session when the project.conf is missing, we need a more specific error to catch.
* tests/frontend/init.py: New test to test edge cases for new `bst init` command.Tristan Van Berkom2018-04-081-0/+97
|
* _frontend/cli.py, _frontend/app.py: Implemented new `bst init` command.Tristan Van Berkom2018-04-083-2/+228
| | | | | | | This comes with an interactive mode unless the project name is specified on the command line. This fixes issue #342
* _yaml.py: Allow None for provenance argument in _yaml.assert_symbol_name()Tristan Van Berkom2018-04-081-4/+6
| | | | Since we now also use this to validate user input on the command line.
* _versions.py: Added new file just to hold basic symbolic versionsTristan Van Berkom2018-04-083-18/+40
| | | | | | | | | | This is where we're going to store BST_CORE_ARTIFACT_VERSION and BST_FORMAT_VERSION from now on. This was a little bit weirdly defined before, and now we need to at least have BST_FORMAT_VERSION available from the frontend/cli without onerous imports (we need to import it there, but dont want to slow down load time for bash completion runs).
* _project.py: Remove BST_WORKSPACE_FORMAT_VERSIONTristan Van Berkom2018-04-081-1/+0
| | | | This is now defined in _workspaces.py
* Complete the work started to allow None as default in _yaml.node_get()Tristan Van Berkom2018-04-076-16/+16
| | | | | | | This completes the work which was started in commit 3ba544b80f9f268be8ffe62fc8589b30212ec4a2 which only went half way towards updating all the source code to be consistent and use the new semantic which allows None values.
* Allow 'None' as a default_value for _yaml.node_getTristan Maat2018-04-079-25/+37
|
* _frontend/cli.py: Remove --no-checkout option for `bst workspace reset`Tristan Van Berkom2018-04-072-7/+4
| | | | This option in `bst workspace reset` is just pointless.
* _frontend/cli.py: Add option to close multiple workspacesChandan Singh2018-04-072-7/+56
| | | | | | | | | | | | | At present, it is only possible to close workspaces for elements one at a time. This can become slightly tedious process when you have multiple workspaces open and you want to close all of them, maybe because you just finished working on a set of related elements. Instead of accepting a single element, accept a list of elements as argument for `bst workspace close`. Additionally, add `-a`/`--all` option to close all workspaces. Fixes #337 - Add option to close all workspaces.
* data/userconfig.yaml: Change default logging to print full shas at init and ↵Tristan Van Berkom2018-04-061-1/+1
| | | | | | | | | | bst show This may be obnoxious for `bst show` purposes, which will now also print the full artifact cache keys instead of nicely abbreviated ones, but it is a more appropriate default for the heading of a build session. This fixes issue #343
* doc/source/projectconf.rst: Document restrictions on option and option ↵Tristan Van Berkom2018-04-061-0/+11
| | | | variable names.
* doc/source/projectconf.rst: Properly document the project name.Tristan Van Berkom2018-04-061-2/+10
| | | | This is a part of issue #339
* tests/format/options.py: Added tests for invalid variable names in optionsTristan Van Berkom2018-04-065-0/+31
|
* tests/format/options.py: Added tests for invalid option name symbolsTristan Van Berkom2018-04-069-0/+45
|
* tests/format/project.py: Added tests for loading of invalid project namesTristan Van Berkom2018-04-063-0/+22
|
* tests/project/plugins.py: Removed this old style testTristan Van Berkom2018-04-068-119/+0
| | | | This is sufficiently covered by other tests in tests/format/project.py
* tests/format/project.py: Converted to use CLI test harnessTristan Van Berkom2018-04-0610-89/+51
| | | | | | Moved the old style project format tests into the new CLI based directory in tests/format/ and converted to use the CLI fixture for these tests.
* _options/option.py: Assert valid symbol names for variable exportsTristan Van Berkom2018-04-061-0/+5
|
* _options/optionpool.py: Assert valid symbol names for option names.Tristan Van Berkom2018-04-061-1/+5
| | | | These must be alphanumeric and may not contain dashes.
* _project.py: Assert that the loaded project name is a valid symbol nameTristan Van Berkom2018-04-061-0/+5
| | | | Fixes issue #339
* _yaml.py: Added assert_symbol_name() helper function.Tristan Van Berkom2018-04-061-0/+45
| | | | | | This function asserts that a loaded symbol name is a valid one, and raises an appropriate and consistent LoadError if an invalid symbol name is encountered.
* _exceptions.py: Added LoadErrorReason.INVALID_SYMBOL_NAMETristan Van Berkom2018-04-061-0/+3
|
* tests/frontend/buildcheckout.py: Added junction related testsTristan Van Berkom2018-04-051-1/+90
| | | | | | | | | | o Test that we get the expected error if the junction element the pipeline refers to is inconsistent o Test that the junction element is automatically fetched as a part of the build phase Both tests using both ref-storage modes
* tests/frontend/track.py: Added junction related testsTristan Van Berkom2018-04-051-2/+76
| | | | | | | | | | | o Test that we bail out with the expected errors when the junction element in question is Consistency.INCONSISTENT o Test that tracking the junction itself, causes a subsequent show of the pipeline to not bail out anymore (tests that tracking works and persists for a junction element). Again these use both ref-storage modes.
* tests/frontend/fetch.py: Added tests for automatically fetching the junctionsTristan Van Berkom2018-04-051-1/+87
| | | | | | | | | | o This tests that a Consistency.RESOLVED junction will automatically be fetched when `bst fetch` is run on a pipeline which refers to a junction. o Further, it tests that a Consistency.INCONSISTENT junction will bail out with the expected error message Again testing with both ref-storage modes
* tests/frontend/show.py: Test behaviors of showing junctioned elementsTristan Van Berkom2018-04-055-1/+135
| | | | | | | | | | o Test error conditions for showing an unfetched junctioned project o Test error conditions for showing an untracked junctioned project Both tests check both modes of ref-storage. This adds a new shared helper function `generate_junction`
* tests/frontend: Share the configure_project() functionTristan Van Berkom2018-04-053-12/+13
| | | | Make buildtrack.py and track.py share the same configure_project() helper.