Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The latest filter could not be loaded due to image cache #98

Open
xujinguang opened this issue Mar 25, 2020 · 1 comment
Open

The latest filter could not be loaded due to image cache #98

xujinguang opened this issue Mar 25, 2020 · 1 comment

Comments

@xujinguang
Copy link

I found there is no delete command on the webassemblyhub.io website,so I don't want to change tags to generate a bunch of junk. Then I always use the same tag to push image to the webassemblyhub.io, this ok, it can overwrite the old image.

But when I deploy it, I found wasme use the old cache by ref key. And wasme not update the cache.

here

func (c *CacheImpl) Add(ctx context.Context, ref string) (digest.Digest, error) {
	if img := c.cacheState.findImage(ref); img != nil {
		desc, err := img.Descriptor()
		if err != nil {
			return "", err
		}
		return desc.Digest, nil
	}
//....
}

try to clear cache, but it doesn't success

kubectl  exec  wasme-operator-5b7788d9bb-2wb27   -n wasme -- /usr/local/bin/wasme cache  webassemblyhub.io/kowalski/modify-body:v0.3  --clear-cache=true --port=0

so I must delete the configmap and wasme-cache pod to update cache.

This is unreasonable, because you can't stop the user from updating the image with same tag.

How to solve this?

@yuval-k
Copy link
Member

yuval-k commented Apr 28, 2020

good question - we are updating the caching mechanism and will see how to best address cache updates; the problem is that you do want to cache the tags in most cases, so we will have to think on how best to accomplish this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants