Fetch the asserted graph through the same service for local and reactor modes. The CLI adapts this immutable snapshot to RDF without opening redb.
(
root: &Path,
)
| 7104 | /// Fetch the asserted graph through the same service for local and reactor |
| 7105 | /// modes. The CLI adapts this immutable snapshot to RDF without opening redb. |
| 7106 | pub(crate) fn workflow_snapshot( |
| 7107 | root: &Path, |
| 7108 | ) -> CliResult<atomic_repository::repository::WorkflowSnapshot> { |
| 7109 | let session = Service::open_root(root)?.ok_or_else(|| CliError::InvalidArgument { |
| 7110 | message: "workflow validation requires a local repository service".into(), |
| 7111 | })?; |
| 7112 | let response = session.get_workflow_snapshot(pb::GetWorkflowSnapshotRequest { |
| 7113 | repository: Some(session.reference.clone()), |
| 7114 | })?; |
| 7115 | decode_workflow_snapshot(response) |
| 7116 | } |
| 7117 | |
| 7118 | fn decode_workflow_snapshot( |
| 7119 | response: pb::GetWorkflowSnapshotResponse, |
no test coverage detected