Skip to content

Bug: Deleting a chart having a suffix in its version via the API causes no removal from index #22

@mahnkong

Description

@mahnkong

Hello,

We observed that deleting a chart having a suffix in its version via the API causes no removal from the index. The deletion from the file system works:

POST, GET, DELETE for chart having a version without suffix:

curl -X POST -k --data-binary "@mychart-1.0.4.tgz" localhost:8080/api/charts
{"saved":true}

curl localhost:8080/api/charts
{"mychart":[{"name":"mychart","version":"1.0.4","description":"mychart","apiVersion":"v1","urls":["charts/mychart-1.0.4.tgz"],"created":"2017-11-24T16:09:28.993494102+01:00","digest":"a4f08b5a9ccd5a958429c3ecf5fa45fdf2f271882cba7924c4fc9204645a8c7f"}]}

curl -X DELETE  localhost:8080/api/charts/mychart/1.0.4
{"deleted":true}

curl localhost:8080/api/charts
{}

POST, GET, DELETE for chart having a version with suffix:

curl -X POST -k --data-binary "@mychart-1.0.4-SNAPSHOT.tgz" localhost:8080/api/charts
{"saved":true}

curl localhost:8080/api/charts
{"mychart":[{"name":"mychart","version":"1.0.4-SNAPSHOT","description":"mychart","apiVersion":"v1","urls":["charts/mychart-1.0.4-SNAPSHOT.tgz"],"created":"2017-11-24T16:09:28.993494102+01:00","digest":"a4f08b5a9ccd5a958429c3ecf5fa45fdf2f271882cba7924c4fc9204645a8c7f"}]}

curl -X DELETE  localhost:8080/api/charts/mychart/1.0.4-SNAPSHOT
{"deleted":true}

curl localhost:8080/api/charts
{"mychart":[{"name":"mychart","version":"1.0.4-SNAPSHOT","description":"mychart","apiVersion":"v1","urls":["charts/mychart-1.0.4-SNAPSHOT.tgz"],"created":"2017-11-24T16:09:28.993494102+01:00","digest":"a4f08b5a9ccd5a958429c3ecf5fa45fdf2f271882cba7924c4fc9204645a8c7f"}]}

Best regards,
Andreas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions