[BuildStream] Preserving artifacts out of workspaces



I have been looking at, preserving artifacts out of workspaces, https://gitlab.com/BuildStream/buildstream/issues/512.

Overview
========

At the end of the ticket it mentions artifacts appearing in arbitrary location with in the sandbox however this seems to be at odds with, my understanding of, the behavior of the sand box, as at build time most of the sandbox is read only.

This means that the only place that artifacts should be is in subdirectories of the parent of the source directory.

Having Spoken to the originator of the ticket and some of those who have already been discussing the ticket, it seems that their most likely use case would be to have artifacts in the parent of the source directory (or in folders contained with in it).

There for if I make the *assumption*that all artifacts will reside in the source directories parent (or folders from it).

Then it seems to me that, of the Possible fixes in the issue, the first is the most simple and useful/flexible.

However it also seems that while we would want to support this behavior it will only occasionally be useful and change how workspaces behave for those already using buildstream. It may be best to add a switch to allow a "build-root" or "source", workspace.

Proposal
========

Allow for workspaces to be created with the parent of the source folder mounted rather than the source folder mounted.

This would be used when the user ran `bst workspace open element.bst DestDir --source-parent` but not affect the current behavior of `bst workspace open element.bst DestDir`.

A key requirement would be that the artifacts are loaded back in from the workspace for subsequent runs so that incremental builds can use previously build artifacts within arbitrary locations with in the build-root.

Implementation
==============

This means some implementation changes to the staging and unstaging to and from the sand box of the existing workspace code, and keeping track of what type of workspace it is etc etc.

And some front end changes to allow the `--source-parent` option to be passed to the work space and staging functions.

Thanks
Will


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]