You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
format!("cannot pull Spin application from registry reference {reference:?}")
})?;
It would be nice to have a function similiar to let app = spin_loader::from_file(PathBuf::from("/spin.toml"), Some(working_dir.clone())).await.context("unable to find app file")?;
Thanks for creating this @jsturtevant; it shouldn't be a problem to refactor as suggested and provide an additional method for loading an OCI-based Spin app from an already-fetched config (no pull involved).
@jsturtevant Looking at your diff I can't imagine any reason we'd do it differently (though I might suggest naming the new function something like load_pulled_app or load_from_cache) - would you like to send a PR, or would you rather we implemented it?
Background
This issue in runwasi containerd/runwasi#108 and the approach outlined in https://docs.google.com/document/d/11shgC3l6gplBjWF1VJCWvN_9do51otscAm0hBDGSSAc. Also the changes proposed in #1857
Proposed changes
In kubernetes based environment, the OCI artifacts might be already pre-pulled but the OCI client requires pulling them:
spin/crates/oci/src/loader.rs
Lines 25 to 29 in 362c75d
It would be nice to have a function similiar to
let app = spin_loader::from_file(PathBuf::from("/spin.toml"), Some(working_dir.clone())).await.context("unable to find app file")?;
but for
spin.json
that OCI artifacts use.I've prototyped this working with this change used in deislabs/containerd-wasm-shims#164. But there might be better ways to approach it.
The text was updated successfully, but these errors were encountered: