-
Notifications
You must be signed in to change notification settings - Fork 599
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
Deleting a team results in a 500 because of a uniqueness constraint violation #4281
Comments
I assume this is the same as #4252? |
Yup, I think you're right. Closed that one because I put more detail here. |
Hello, I want to work on this and have taken a look at the code. |
@Bogay "case insensitive" does not mean that GitHub needs a lowercase string, it means that they don't care whether it's lowercase, UPPERCASE or AnyTHIng nI beTWeen. the issue is rather that crates.io itself appears to care about the casing, before we even send the request to GitHub. |
As far as I can tell, we're always storing the lowercased team name currently: |
This may be related to #1818
Someone reported via email that they tried to remove a team as an owner of a crate. The team existed on GitHub, as far as I can tell. The command they ran was:
crates.io returned a 500, and I see this in the logs (irrelevant details removed):
I'm not sure why a DELETE owners request is trying to... update? insert? into the teams table such that the unique constraint is violated. I haven't looked into the code yet, and I'm going to fix the database for this user.
My current suspicion is that this has something to do with case sensitivity-- in the database, we have the team login stored as
github:orgname:teamname
but the user specifiedgithub:OrgName:TeamName
to cargo....The text was updated successfully, but these errors were encountered: