Skip to content

Remove license column on crates table #1815

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

Merged
merged 2 commits into from
Sep 5, 2019
Merged

Remove license column on crates table #1815

merged 2 commits into from
Sep 5, 2019

Conversation

rye
Copy link
Contributor

@rye rye commented Aug 28, 2019

Seemingly the last step in the checklist on #736, this PR removes the license column on the crates table, and all references thereto. (In fact, I think #736 can be closed once this PR is merged.)

As of #803, the front-end no longer really used this field, and the front-end was also changed to render the license of the current version, instead of the value coming from this now-obsolete license column on the crate. Thus, this column likely contains stale data and, to my knowledge, isn't changed at all when a new version is uploaded.

I wasn't sure what requirements are enforced for backwards-compatibility, or whether my changes here would actually affect behavior of e.g. if there are old versions of cargo that will upload with these values. I am happy for these changes to be scrutinized until this is verified to be safe.

@rust-highfive
Copy link

r? @sgrif

(rust_highfive has picked a reviewer for you, use r? to override)

@rye rye changed the title Remove license column on crates Remove license column on crates table Aug 28, 2019
Copy link
Contributor

@sgrif sgrif left a comment

Choose a reason for hiding this comment

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

Since this contains commits which need to be deployed separately, if you could rebase this into exactly 2 commits that would be helpful.

rye added 2 commits August 29, 2019 18:19
This is a big change!  `cargo check` says this is fine, but some
manual verification and testing is probably a good idea.  (`cargo test`
does pass locally for me, but that only tells half the story.)

As part of (GitHub) #736, this commit not only removes the commitment
of license information into the database, but it also removes the
handling in the controller.  For silent backwards compatibility, it
might be better to simply drop the license field, for example if it's
being uploaded by outdated clients.  I am not sure, however, and will
probably need feedback on this.

(A commit running `cargo fmt` was also rebased into this one.)

Signed-off-by: Kristofer Rye <[email protected]>
This is a destructive migration!  It might be best to deploy it
independently of its parent.

Signed-off-by: Kristofer Rye <[email protected]>
@rye
Copy link
Contributor Author

rye commented Aug 29, 2019

@sgrif, thanks! The rebase has been pushed… I merged the cargo fmt into the first commit as it was where the style fell out of consistency.

@sgrif
Copy link
Contributor

sgrif commented Aug 29, 2019

Thank you! This looks fine, but I'm going to hold off on merging until tomorrow so I can deploy it immediately after since this contains destructive migrations.

@sgrif
Copy link
Contributor

sgrif commented Sep 5, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 5, 2019

📌 Commit 37bd286 has been approved by sgrif

@bors
Copy link
Contributor

bors commented Sep 5, 2019

⌛ Testing commit 37bd286 with merge 66c60dc...

bors added a commit that referenced this pull request Sep 5, 2019
Remove `license` column on `crates` table

Seemingly the last step in the checklist on #736, this PR removes the `license` column on the `crates` table, and all references thereto. (In fact, I think #736 can be closed once this PR is merged.)

As of #803, the front-end no longer really used this field, and the front-end was also changed to render the license of the _current_ version, instead of the value coming from this now-obsolete `license` column on the crate. Thus, this column likely contains stale data and, to my knowledge, isn't changed at all when a new version is uploaded.

I wasn't sure what requirements are enforced for backwards-compatibility, or whether my changes here would actually affect behavior of e.g. if there are old versions of `cargo` that will upload with these values. I am happy for these changes to be scrutinized until this is verified to be safe.
@bors
Copy link
Contributor

bors commented Sep 5, 2019

☀️ Test successful - checks-travis
Approved by: sgrif
Pushing 66c60dc to master...

@bors bors merged commit 37bd286 into rust-lang:master Sep 5, 2019
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.

4 participants