Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

[FEATURE] Use wasmcloud cache for inspect commands #138

Closed
brooksmtownsend opened this issue May 6, 2021 · 3 comments · Fixed by #204
Closed

[FEATURE] Use wasmcloud cache for inspect commands #138

brooksmtownsend opened this issue May 6, 2021 · 3 comments · Fixed by #204
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@brooksmtownsend
Copy link
Member

Is your feature request related to a problem? Please describe.
Currently, both wash claims inspect and wash par inspect do not refer to the wasmcloud cache before downloading an actor or provider from an OCI registry. This causes the inspect command to take longer than it should, as OCI references are intended to be immutable.

Describe the solution you'd like
Following the same process as wasmcloud-host does, wash claims inspect and wash par inspect should read and write from/to the cache stored in the user's temp directory. This logic can be found in the cached_file function.

@brooksmtownsend brooksmtownsend added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels May 6, 2021
@brooksmtownsend
Copy link
Member Author

@stevelr I'm okay with moving this to the Post MVP scope as it has some implications around inspecting what's in a local registry, thoughts?

@brooksmtownsend
Copy link
Member Author

brooksmtownsend commented Nov 8, 2021

Regarding my above comment, the implication is as follows:

If an actor/provider is present in the local cache, then the idea is that wash claims inspect would display the embedded claims in the cached file rather than fetching the latest artifact (if it changed). I actually think this is intended behavior, as it shows you the information about the actor/provider that the host will start.

What I'd love to see for this issue is to:

  1. Inspect artifacts in the local cache. The Rust code to determine where an actor is stored can be found here, and the provider code is here
    2. Add a --disable-cache boolean flag that will fetch the latest artifact from the OCI URL and overwrite the local cache. This could be derived from an environment variable like WASH_DISABLE_CACHE in order to disable cache and always fetch the latest artifact.
  2. Add a --no-cache boolean flag that will fetch the latest artifact from the OCI URL and overwrite the local cache. This could be derived from an environment variable like WASH_NO_CACHE in order to disable cache and always fetch the latest artifact. (changed from disable-cache as per @stevelr 's good suggestion)

@stevelr
Copy link
Contributor

stevelr commented Nov 8, 2021

nit: to me "disable" sounds like it might mean turning the cache off for longer than the duration of the current command. For example, "disable" for systemd services means turning them off for the next boot. --no-cache sounds more temporary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants