buildpacks / registry-api

API for searching and reading the Buildpack Registry
Apache License 2.0
3 stars 8 forks source link

Yanked buildpacks have no warning shown on their registry page #112

Open edmorley opened 1 year ago

edmorley commented 1 year ago

All versions of this buildpack are yanked (including the latest version): https://registry.buildpacks.io/buildpacks/heroku/nodejs-typescript

...however, the fact that this buildpack is yanked is not mentioned on that page - meaning users will not know, and may use it thinking it's still actively maintained.

joshwlewis commented 1 year ago

It looks like the registry's DB still has this buildpack recorded as "yanked": false: https://cnb-registry-api-staging.herokuapp.com//api/v1/buildpacks/heroku/nodejs-typescript/0.2.3. Seems like there's still an issue with the caching process.

edmorley commented 1 year ago

Oh good point.

So looking now it seems yanked is not set on update: https://github.com/buildpacks/registry-api/blob/fec94927c7576e4c937044ec768fc579a08e8c4c/cmd/index-buildpacks/main.go#L191-L200

I did actually check for any other missing fields when working on #117, however, I did so by checking the list of fields set in the SQL for creation vs update, and it seems the yanked field is not set explicitly even for creation, but instead is implicitly set to false via its default value: https://github.com/buildpacks/registry-api/blob/fec94927c7576e4c937044ec768fc579a08e8c4c/db/schema.rb#L24

edmorley commented 1 year ago

So I guess the yank feature has never worked properly, and none of these yanked buildpacks are actually yanked according to API: https://github.com/buildpacks/registry-index/issues?q=is%3Aissue+yank+is%3Aclosed

edmorley commented 2 months ago

This also affects the latest round of yanking (of the test multi-arch 0.0.999 releases): https://github.com/buildpacks/registry-index/issues?q=is%3Aissue+author%3Aheroku-languages-release-bot+yank