Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Aug 26, 2024
1 parent 3ab2431 commit fb9ee7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions nexus/src/app/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1830,8 +1830,8 @@ impl super::Nexus {
}
}

/// Publishes the VMM and migration state supplied in `new_runtime_state` to the
/// database.
/// Writes the VMM and migration state supplied in `new_runtime_state` to the
/// database (provided that it's newer than what's already there).
///
/// # Return value
///
Expand Down
8 changes: 3 additions & 5 deletions sled-agent/src/instance_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,9 @@ impl InstanceManagerRunner {
// name to capture into a bundle, so return a `NoSuchZone` error.
let vmm_id: PropolisUuid = name
.strip_prefix(PROPOLIS_ZONE_PREFIX)
.ok_or_else(|| BundleError::NoSuchZone { name: name.to_string() })
.and_then(|uuid_str| {
uuid_str.parse::<PropolisUuid>().map_err(|_| {
BundleError::NoSuchZone { name: name.to_string() }
})
.and_then(|uuid_str| uuid_str.parse::<PropolisUuid>().ok())
.ok_or_else(|| BundleError::NoSuchZone {
name: name.to_string(),
})?;

let Some(instance) = self.jobs.get(&vmm_id) else {
Expand Down

0 comments on commit fb9ee7e

Please sign in to comment.