Skip to content

Commit d5a691f

Browse files
Make OCI component resolver available to SpinKube (#3406)
(cherry picked from commit 06a476b) Signed-off-by: itowlson <ivan.towlson@fermyon.com> Co-authored-by: itowlson <ivan.towlson@fermyon.com>
1 parent c5cb334 commit d5a691f

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

crates/oci/src/loader.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,17 @@ impl OciLoader {
100100
}
101101
}
102102

103-
async fn resolve_component_content_refs(
103+
/// Resolves all digest references in the component (including source, dependencies,
104+
/// and asset files). Wasm sources are replaced with cache paths. Asset files are
105+
/// collected to a mount path, and the component `files` amended to reflect that.
106+
///
107+
/// This function assumes that:
108+
///
109+
/// 1. All resolvable items have digest or inline sources.
110+
/// 2. All digest-addressed content is already in the cache.
111+
///
112+
/// If either of these is not true, the function errors.
113+
pub async fn resolve_component_content_refs(
104114
&self,
105115
component: &mut LockedComponent,
106116
cache: &Cache,

0 commit comments

Comments
 (0)