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,
)
| 7144 | /// Fetch the asserted graph through the same service for local and reactor |
| 7145 | /// modes. The CLI adapts this immutable snapshot to RDF without opening redb. |
| 7146 | pub(crate) fn workflow_snapshot( |
| 7147 | root: &Path, |
| 7148 | ) -> CliResult<atomic_repository::repository::WorkflowSnapshot> { |
| 7149 | let session = Service::open_root(root)?.ok_or_else(|| CliError::InvalidArgument { |
| 7150 | message: "workflow validation requires a local repository service".into(), |
| 7151 | })?; |
| 7152 | let response = session.get_workflow_snapshot(pb::GetWorkflowSnapshotRequest { |
| 7153 | repository: Some(session.reference.clone()), |
| 7154 | review_document: None, |
| 7155 | })?; |
| 7156 | decode_workflow_snapshot(response) |
| 7157 | } |
| 7158 | |
| 7159 | fn decode_workflow_snapshot( |
| 7160 | response: pb::GetWorkflowSnapshotResponse, |
no test coverage detected