-
-
Notifications
You must be signed in to change notification settings - Fork 916
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
Restoring a yanked gem #1548
Comments
I thought we didn't want to make yanks reversible? |
It is not to make yanking reversible. Someday, we might want to restore a gem which has been yanked in rage quit or by mistake. Hence the script, which is meant to be used only by admins. |
since we’ll only use this script if the world is ending 😆 it seems fine to recreate the versions list |
@sonalkr132 in that case, you could just delete the |
I was hoping we could achieve this without having to recreate versions list so that we can entertain requests like one recently received on help site.
I hope you meant delete the yanked_at and yanked_info_checksum fields and mark version indexed. It would remove the yanked version line, leaving our versions response as following:
We can't remove a line once it has been added to versions response because clients will be making partial requests on basis of what they have already cached. I bet you already know that. 😛 |
if the downloaded file's checksum doesn't match the etag, the client will re-request the entire file |
That is same as regenerating the versions.list file. When I say expensive, I don't mean expensive to regenerate the file. I mean it would be expensive for all the clients to download the complete file. Given the stakes we won't be able to do it very often. |
Suppose world is coming to an end 🌋 and only way it can be saved is if we can restore yanked versions of the gem. As you may know, gem yank removes the .gem file from S3 and our CDN.
We can restore S3 bucket of yanked version using this restore function. Now we need to index its version, expire memcache and fastly accordingly and destroy the deletion record. Taking hint from this comment I came up with this. It wouldn't be enough for our versions endpoint. After yanking a version our versions endpoint would look something like this:
Since it is intended to be append only, after restoring
0.1.10
it should look like following:I am not exactly sure how are we going to make
0.1.10
appear a third time.Alternatively, we can create a new
versions.list
file which would expire clients' cache. We won't want to do that either because it's expensive.cc: @indirect, @segiddins
The text was updated successfully, but these errors were encountered: