Skip to content

Commit

Permalink
fix(server): make image_uri optional (#1094)
Browse files Browse the repository at this point in the history
seriousben authored Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 40682fb commit 535e785
Showing 4 changed files with 4 additions and 5 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions server/data_model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ pub struct ImageInformation {
pub run_strs: Vec<String>,
pub image_hash: String,
pub version: ImageVersion, // this gets updated when the hash changes
pub image_uri: String,
pub image_uri: Option<String>,
}

impl ImageInformation {
@@ -116,7 +116,7 @@ impl ImageInformation {
run_strs,
image_hash: format!("{:x}", image_hasher.finalize()),
version: ImageVersion::default(),
image_uri: "".to_string(),
image_uri: None,
}
}
}
2 changes: 1 addition & 1 deletion server/data_model/src/test_objects.rs
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ pub mod tests {
],
image_hash: "".to_string(),
version: Default::default(),
image_uri: "1234567890.dkr.ecr.us-east-1.amazonaws.com/test".to_string(),
image_uri: Some("1234567890.dkr.ecr.us-east-1.amazonaws.com/test".to_string()),
},
};
let fn_b = test_compute_fn("fn_b", None);
3 changes: 1 addition & 2 deletions server/src/http_objects.rs
Original file line number Diff line number Diff line change
@@ -91,8 +91,7 @@ pub struct ImageInformation {
pub tag: String,
pub base_image: String,
pub run_strs: Vec<String>,
#[serde(default)]
pub image_uri: String,
pub image_uri: Option<String>,
}

impl fmt::Debug for ImageInformation {

0 comments on commit 535e785

Please sign in to comment.