diff --git a/lib/apps/fabro-cli/src/commands/run/runner.rs b/lib/apps/fabro-cli/src/commands/run/runner.rs index 72044458d..713838555 100644 --- a/lib/apps/fabro-cli/src/commands/run/runner.rs +++ b/lib/apps/fabro-cli/src/commands/run/runner.rs @@ -1018,11 +1018,11 @@ impl RunStoreBackend for HttpRunStore { .await } - async fn read_blob(&self, id: &BlobHash) -> Result> { + async fn read_blob(&self, blob_hash: &BlobHash) -> Result> { self.with_retries("read run blob", || { let client = self.client.clone_for_reuse(); let run_id = self.run_id; - let blob_hash = *id; + let blob_hash = *blob_hash; async move { client.read_run_blob(&run_id, &blob_hash).await } }) .await diff --git a/lib/components/fabro-store/src/slate/blob_store.rs b/lib/components/fabro-store/src/slate/blob_store.rs index cb168cd2b..8cec4c296 100644 --- a/lib/components/fabro-store/src/slate/blob_store.rs +++ b/lib/components/fabro-store/src/slate/blob_store.rs @@ -56,12 +56,12 @@ impl BlobStore { Ok(id) } - pub async fn read(&self, id: &BlobHash) -> Result> { - Ok(self.repo.get(id).await?.map(|blob| blob.0)) + pub async fn read(&self, blob_hash: &BlobHash) -> Result> { + Ok(self.repo.get(blob_hash).await?.map(|blob| blob.0)) } - pub async fn exists(&self, id: &BlobHash) -> Result { - self.repo.exists(id).await + pub async fn exists(&self, blob_hash: &BlobHash) -> Result { + self.repo.exists(blob_hash).await } } diff --git a/lib/components/fabro-store/src/slate/run_store.rs b/lib/components/fabro-store/src/slate/run_store.rs index 9148ede95..c4c590a0d 100644 --- a/lib/components/fabro-store/src/slate/run_store.rs +++ b/lib/components/fabro-store/src/slate/run_store.rs @@ -561,8 +561,8 @@ impl RunDatabase { self.inner.blob_store.write(data).await } - pub async fn read_blob(&self, id: &BlobHash) -> Result> { - self.inner.blob_store.read(id).await + pub async fn read_blob(&self, blob_hash: &BlobHash) -> Result> { + self.inner.blob_store.read(blob_hash).await } pub async fn state(&self) -> Result { diff --git a/lib/components/fabro-workflow/src/handler/command.rs b/lib/components/fabro-workflow/src/handler/command.rs index 828a56101..d36ef8be8 100644 --- a/lib/components/fabro-workflow/src/handler/command.rs +++ b/lib/components/fabro-workflow/src/handler/command.rs @@ -398,8 +398,11 @@ mod tests { Ok(blob_hash) } - async fn read_blob(&self, id: &fabro_types::BlobHash) -> anyhow::Result> { - Ok(self.blobs.lock().await.get(id).cloned()) + async fn read_blob( + &self, + blob_hash: &fabro_types::BlobHash, + ) -> anyhow::Result> { + Ok(self.blobs.lock().await.get(blob_hash).cloned()) } async fn read_run_log(&self) -> anyhow::Result>> { diff --git a/lib/components/fabro-workflow/src/lifecycle/git.rs b/lib/components/fabro-workflow/src/lifecycle/git.rs index 73100e6c1..18f4139bf 100644 --- a/lib/components/fabro-workflow/src/lifecycle/git.rs +++ b/lib/components/fabro-workflow/src/lifecycle/git.rs @@ -1328,7 +1328,7 @@ mod tests { Ok(BlobHash::new(data)) } - async fn read_blob(&self, _id: &BlobHash) -> Result> { + async fn read_blob(&self, _blob_hash: &BlobHash) -> Result> { Ok(None) } diff --git a/lib/components/fabro-workflow/src/pipeline/finalize.rs b/lib/components/fabro-workflow/src/pipeline/finalize.rs index 9f43e86ff..b1e7847ee 100644 --- a/lib/components/fabro-workflow/src/pipeline/finalize.rs +++ b/lib/components/fabro-workflow/src/pipeline/finalize.rs @@ -1823,7 +1823,7 @@ mod tests { Ok(BlobHash::new(data)) } - async fn read_blob(&self, _id: &BlobHash) -> Result> { + async fn read_blob(&self, _blob_hash: &BlobHash) -> Result> { Ok(None) } diff --git a/lib/components/fabro-workflow/src/runtime_store.rs b/lib/components/fabro-workflow/src/runtime_store.rs index a12a7c85a..af4eae425 100644 --- a/lib/components/fabro-workflow/src/runtime_store.rs +++ b/lib/components/fabro-workflow/src/runtime_store.rs @@ -14,7 +14,7 @@ pub trait RunStoreBackend: Send + Sync { async fn list_events(&self) -> Result>; async fn append_run_event(&self, event: &RunEvent) -> Result<()>; async fn write_blob(&self, data: &[u8]) -> Result; - async fn read_blob(&self, id: &BlobHash) -> Result>; + async fn read_blob(&self, blob_hash: &BlobHash) -> Result>; async fn read_run_log(&self) -> Result>>; } @@ -50,8 +50,8 @@ impl RunStoreHandle { self.backend.write_blob(data).await } - pub async fn read_blob(&self, id: &BlobHash) -> Result> { - self.backend.read_blob(id).await + pub async fn read_blob(&self, blob_hash: &BlobHash) -> Result> { + self.backend.read_blob(blob_hash).await } pub async fn read_run_log(&self) -> Result>> { @@ -98,9 +98,9 @@ impl RunStoreBackend for LocalRunStoreBackend { .map_err(anyhow::Error::from) } - async fn read_blob(&self, id: &BlobHash) -> Result> { + async fn read_blob(&self, blob_hash: &BlobHash) -> Result> { self.run_store - .read_blob(id) + .read_blob(blob_hash) .await .map_err(anyhow::Error::from) }