Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into slumber-pvf-host-pr…
…echecking-2
  • Loading branch information
slumber committed Oct 22, 2021
commit b17eb793439f608b494d62cddcafb6c717e9f377
1 change: 1 addition & 0 deletions node/core/pvf/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ async fn handle_prepare_done(
return Ok(())
},
Some(state @ ArtifactState::Preparing { waiting_for_response: _ }) => state,

};

if let ArtifactState::Preparing { waiting_for_response } = state {
Expand Down
4 changes: 2 additions & 2 deletions node/core/pvf/src/prepare/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ pub enum FromPool {
Spawned(Worker),

/// The given worker either succeeded or failed the given job.
/// The artifact file has only been written if the preparation was successful.
/// The `bool` says whether the worker ripped.
Concluded {
/// A key for retrieving the worker data from the pool.
worker: Worker,
/// Indicates whether the worker process was killed.
rip: bool,
/// [`Ok`] indicates that compiled artifact is successfully stored on disk.
/// Otherwise, an [error](PrepareError) is supplied.
Expand Down
7 changes: 6 additions & 1 deletion node/core/pvf/src/prepare/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ mod tests {
use futures::{future::BoxFuture, FutureExt};
use slotmap::SlotMap;
use std::task::Poll;
use crate::error::PrepareError;

/// Creates a new PVF which artifact id can be uniquely identified by the given number.
fn pvf(descriminator: u32) -> Pvf {
Expand Down Expand Up @@ -774,7 +775,11 @@ mod tests {

assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. });

test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: true, result: Ok(()) });
test.send_from_pool(pool::FromPool::Concluded {
worker: w1,
rip: true,
result: Err(PrepareError::DidNotMakeIt),
});
test.poll_ensure_to_pool_is_empty().await;
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.