Skip to content
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

delete-crate command #529

Merged
merged 9 commits into from
Dec 27, 2019
Merged

delete-crate command #529

merged 9 commits into from
Dec 27, 2019

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Dec 18, 2019

This PR adds a new command to the CLI:

cratesfyi database delete-crate CRATE_NAME

The command will remove all the published versions of a crate, both from the database and S3.

Fixes #528

This is useful when testing against play.minio.io, as it requires the
us-east-1 region name.
Without this commit debugging S3 upload errors is a pain, as there is
no way to see them.
@jyn514
Copy link
Member

jyn514 commented Dec 19, 2019

The command will remove all the published versions of a crate, both from the database and S3.

I think someone mentioned removing only specific versions at some point, is that still something that's planned? That doesn't need to block this PR, but it would be nice to keep in the background.

@pietroalbini
Copy link
Member Author

I think someone mentioned removing only specific versions at some point, is that still something that's planned? That doesn't need to block this PR, but it would be nice to keep in the background.

I don't think we need this at the moment, we can think about that when it's needed.

@pietroalbini pietroalbini force-pushed the delete-crate branch 2 times, most recently from 006eaac to 6221459 Compare December 19, 2019 13:39
@pietroalbini pietroalbini changed the title [WIP] delete-crate command delete-crate command Dec 19, 2019
@pietroalbini
Copy link
Member Author

This is ready for review.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get a chance to finish reviewing, but I left a few comments. Thanks for all the time you spent on the unit tests!

src/bin/cratesfyi.rs Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
README.md Show resolved Hide resolved
src/db/add_package.rs Show resolved Hide resolved
src/db/add_package.rs Show resolved Hide resolved
src/db/add_package.rs Show resolved Hide resolved
src/db/delete_crate.rs Show resolved Hide resolved
src/db/delete_crate.rs Show resolved Hide resolved
@pietroalbini
Copy link
Member Author

Replied to or addressed all the comments.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few more comments. Lots of changes but overall looks really good :) I pushed a commit that made Context Copy instead of having to use an Rc.

src/db/migrate.rs Show resolved Hide resolved
src/db/migrate.rs Outdated Show resolved Hide resolved
@jyn514 jyn514 merged commit 2d412a6 into rust-lang:master Dec 27, 2019
@pietroalbini pietroalbini deleted the delete-crate branch December 27, 2019 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable removal/access restriction for specific versions of a crate, rather than the entire crate
2 participants