Update get_action_result to call FMB on digests in the Action
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This PR changes the behavior of GetActionResult
to not only check if all ActionResult digests are present in CAS, but also check if the Action and it's metadata are present. Unlike for ActionResult this check does not influence whether a cache hit can be returned, but is done solely to refresh the TTL of the referenced blobs. This will keep them in CAS longer and make it less likely that debugging via bgd-browser
or other tools. The method which did this previously, _action_result_blobs_still_exist
has been renamed to account for this.
To enable this I've added get_tree
to the StorageABC
and moved the core implementation out of ContentAddressableStorageInstance
(see the first commit). I've also added an optional raise_on_missing_subdir
boolean to raise NotFoundError
if any referenced Directories are not in CAS and is used when checking the ActionResult
.
Changes proposed in this merge request:
- Add
get_tree
toStorageABC
and migrate core functionality. - Add
raise_on_missing_subdir
toget_tree
- Rename
_action_result_blobs_still_exist
to_referenced_blobs_still_exist
and have it check blobs in the Action as well