chartmuseum icon indicating copy to clipboard operation
chartmuseum copied to clipboard

Cache can't delete correctly when BEARER_AUTH=true

Open abinch opened this issue 5 years ago • 2 comments

Hi, When bearer auth used, I try to delete one chart, the chart has been deleted, but I find the chart exists when I use /api//charts to list charts. steps:

  • upload 3 charts as below

curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts --data-binary "@mychart-0.0.1.tgz" curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts --data-binary "@mychart-0.0.2.tgz" curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts --data-binary "@mychart-0.0.3.tgz"

  • list charts

curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts Response: 3 charts exist.

  • delete mychart-0.0.1.tgz

curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts/mychart/0.0.1 -X DELETE

  • list charts again

curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts Response: 3 charts exist.

  • delete mychart-0.0.1.tgz again

curl -H "Authorization: Bearer $TOKEN" http://<host>/api/<project>/charts/mychart/0.0.1 -X DELETE Response: no such file or directory

abinch avatar Apr 23 '21 05:04 abinch

I think it is nothing about BEARER_AUTH , can you try the case without the BEARER_AUTH ?

And also see the cache-interval

scbizu avatar May 01 '21 17:05 scbizu

Yes, It's nothing about BEARER_AUTH. This problem is the same with this issue, https://github.com/helm/chartmuseum/issues/455 So close this issue

abinch avatar May 12 '21 02:05 abinch