stencil icon indicating copy to clipboard operation
stencil copied to clipboard

Stencil cache proto schema even after schema is deleted

Open whoAbhishekSah opened this issue 1 year ago • 0 comments

Describe the bug

When I delete a proto-schema

curl -X DELETE http://stencil:8080/v1beta1/namespaces/my-proto/schemas/internal

and recreate the schema

buf build -v --path "internal/src" --as-file-descriptor-set -o "internal/generated/out.desc"
curl --fail-with-body -X POST http://stencil:8080/v1beta1/namespaces/pixxel-proto/schemas/internal --data-binary "@internal/generated/out.desc"

The old schema is still present when getting this schema.

curl http://stencil:8080/v1beta1/namespaces/pixxel-proto/schemas/internal -o any.desc
protoc --decode_raw < any.desc. (the output here still shows the old deleted schema)

Here the stencil URL http://stencil:8080/ is a Service which loads balances across multiple stencil pods.

This problem is solved after doing a rolling restart of Stencil pods.

Expected behavior

Stencil appears to be caching the schema even after the pods are deleted. The cache is local to the pod and not shared across all pods, hence old cache is appearing.

whoAbhishekSah avatar Oct 10 '24 06:10 whoAbhishekSah