Skip to content

Commit

Permalink
Renames sync Skipped entry for annotations to InternalValue.
Browse files Browse the repository at this point in the history
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
  • Loading branch information
dcookspi committed Mar 4, 2024
1 parent 68cfb68 commit 3ba643b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/spfs/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ where
};
let annotations = layer.annotations();
let annotation_results = if annotations.is_empty() {
vec![SyncObjectResult::Annotation(SyncAnnotationResult::Skipped)]
vec![SyncObjectResult::Annotation(
SyncAnnotationResult::InternalValue,
)]
} else {
let mut results = Vec::new();
for entry in annotations {
Expand Down Expand Up @@ -388,7 +390,7 @@ where
annotation: graph::Annotation<'_>,
) -> Result<SyncAnnotationResult> {
match annotation.value() {
AnnotationValue::String(_) => Ok(SyncAnnotationResult::Skipped),
AnnotationValue::String(_) => Ok(SyncAnnotationResult::InternalValue),
AnnotationValue::Blob(digest) => {
if !self.processed_digests.insert(digest) {
return Ok(SyncAnnotationResult::Duplicate);
Expand Down Expand Up @@ -896,7 +898,7 @@ impl SyncManifestResult {
#[derive(Debug)]
pub enum SyncAnnotationResult {
/// The annotation did not need to be synced
Skipped,
InternalValue,
/// The annotation was already synced in this session
Duplicate,
/// The annotation was stored in a blob and was synced
Expand All @@ -909,7 +911,7 @@ pub enum SyncAnnotationResult {
impl SyncAnnotationResult {
pub fn summary(&self) -> SyncSummary {
match self {
Self::Skipped | Self::Duplicate => SyncSummary::default(),
Self::InternalValue | Self::Duplicate => SyncSummary::default(),
Self::Synced {
digest: _,
result: _,
Expand Down

0 comments on commit 3ba643b

Please sign in to comment.