-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We currently do some cleverness to pop Directory objects into the OutputDirectories field of the ActionResult for semantic purposes. Unfortunately doing this requires jumping over many hurdles, partially of our own making and partially from REAPI. To detect whether the object is a Directory, we fetch it from CAS and attempt to unmarshal it into a Directory message. We then must convert it to a Tree to store in the ActionResult, which also requires the raw proto. The catch is that things that are not Directory messages may successfully unmarshal into one -- as a motivating example, BuildStream's Source proto is such a message. When this happens, we're very likely to fail the request as we attempt to use the corrupted Directory we've created. To solve this, we could pass through data on whether the asset is supposed to be a directory or not, however doing so is inelegant and has another subtle problem -- if the client decides to use PushDirectory to push something that isn't a Directory (which isn't explicitly banned by the spec), then we will error. As the Action and ActionResults we generate are intended only to be used by us, we can instead break the semantics somewhat and treat the Directory as an opaque file, as we do for Blobs. Note: this intentionally breaks the sharing of Actions should the RemoteExecutionFetcher be used. This feels more correct to me, as we were overwriting the one we actually ran anyway. Under this usage we instead get multiple Actions pointing to the same ActionResult -- one for the actually executed Action, and another for the asset reference.
- Loading branch information
1 parent
d7a9200
commit f0b6649
Showing
3 changed files
with
21 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters