Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions crates/fabric-core/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,9 @@ fn probe_target(
let budget = Duration::try_from_secs_f64(timeout).unwrap_or(Duration::MAX);
let remaining = || budget.saturating_sub(started.elapsed());
let result = (|| -> std::io::Result<AdapterCheckResult> {
let path = crate::runtime::local_host_directory(runtime_id).join("health.endpoint.json");
let path = crate::runtime::local_host_directory(runtime_id)
.map_err(|_| std::io::Error::other("default host storage unavailable"))?
.join("health.endpoint.json");
let mut options = OpenOptions::new();
options.read(true);
#[cfg(unix)]
Expand Down Expand Up @@ -1283,7 +1285,7 @@ mod tests {

fn endpoint(runtime: &RuntimeHandle) -> TcpListener {
let listener = TcpListener::bind((Ipv4Addr::LOCALHOST, 0)).unwrap();
let directory = crate::runtime::local_host_directory(&runtime.runtime_id);
let directory = crate::runtime::local_host_directory(&runtime.runtime_id).unwrap();
std::fs::create_dir_all(&directory).unwrap();
let endpoint = directory.join("health.endpoint.json");
std::fs::write(
Expand Down Expand Up @@ -1379,7 +1381,8 @@ mod tests {

fn cleanup(runtime: &RuntimeHandle) {
invalidate_runtime(runtime);
std::fs::remove_dir_all(crate::runtime::local_host_directory(&runtime.runtime_id)).unwrap();
std::fs::remove_dir_all(crate::runtime::local_host_directory(&runtime.runtime_id).unwrap())
.unwrap();
}

fn gateway_service(runtime: &RuntimeHandle) -> crate::ServiceHandle {
Expand Down
7 changes: 5 additions & 2 deletions crates/fabric-core/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,17 @@ where
let budget = *timeout_seconds;
return request_check_provider_process(command, operation, budget);
}
if matches!(task_command, TaskCommand::Status { .. }) {
if matches!(
task_command,
TaskCommand::Status { .. } | TaskCommand::Result { .. }
) {
return request_check_provider_process(command, operation, 10.0);
}
let operation_name = operation.name();
let request_id = new_id("environment-provider-request");
let environment_key = environment_resource_key(environment)?;
let (identity, is_start, is_stop) = match task_command {
TaskCommand::Check { .. } | TaskCommand::Status { .. } => {
TaskCommand::Check { .. } | TaskCommand::Status { .. } | TaskCommand::Result { .. } => {
unreachable!("reads use a separate provider process")
}
TaskCommand::Start { .. } => (request_id.clone(), true, false),
Expand Down
Loading
Loading