Re: [BuildStream] Proposal: Artifact as a Proto



On Mon, 2019-01-14 at 17:10 +0000, Raoul Hidalgo Charman via
BuildStream-list wrote:

My concern with the generic service is that the semantics of the components
of an artifact, their presence or absence, under various conditions, etc, are
*implicit* in the generic structure rather than being *explicit* under a well
defined proto whose documentation makes it very clear what it means if the
buildtree value is set or unset for example.

As the ref just points to a digest, could it make sense to have it be a digest 
of either an artifact proto or a directory proto? This would keep the reference
service generic (and require no changes), and allow use of the new artifact proto.
This means you would get an error if you used the wrong ref that was pointing to
the other type, but you'd want an error to be raised if this happens anyway.
There could be some issue with this I haven't thought of however.

We want the server to know which blobs are referenced by a particular
ref. This allows the server to influence cache expiry of blobs based on
GetReference requests. I.e., the server needs to be able to decode the
referenced object. And thus, I think only two options make sense: keep
using the directory proto-based approach with a generic service or
define a separate artifact-specific service where we can use the
artifact proto.

Cheers,
Jürg



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