Skip to content

Commit

Permalink
fix. parsing updated artifact manifest format
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusl committed Jun 22, 2023
1 parent f2c36fb commit 6a59f9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/content/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::BTreeMap;

use lifec::prelude::{AttributeIndex, Component, DefaultVecStorage, ThunkContext};
use serde::{Deserialize, Serialize};
use tracing::trace;
use tracing::{trace, debug};

use super::Platform;

Expand Down Expand Up @@ -88,6 +88,12 @@ impl Descriptor {
/// ```
///
pub fn try_parse_streamable_descriptor(&self) -> Option<Self> {
if !self.annotations.as_ref().map(|a| a.contains_key("streaming.mediaType")).unwrap_or_default() {
debug!("Updated artifact manifest detected, skipping annotation parsing");

return Some(self.clone());
}

if let Some(annotations) = self
.annotations
.as_ref()
Expand Down

0 comments on commit 6a59f9e

Please sign in to comment.