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

Trusted publishing: pending publisher should warn about ultranormalized name collision #16226

Open
twm opened this issue Jul 7, 2024 · 4 comments · May be fixed by #16260
Open

Trusted publishing: pending publisher should warn about ultranormalized name collision #16226

twm opened this issue Jul 7, 2024 · 4 comments · May be fixed by #16260

Comments

@twm
Copy link
Contributor

twm commented Jul 7, 2024

What's the problem this feature will solve?

I created a pending publisher when I named my package:

image

But when I tried to use it I got an error:

Error: Trusted publishing exchange failure:
Token request failed: the server refused the request for the following reasons:

It's probably colliding with coverage_pth, the abandoned package I'm trying to replace.

Describe the solution you'd like

The PyPI UI should warn that the pending publisher will fail to create the package due to a name conflict. I'd expect this check to happen on page load, since the UI warns that races are possible:

image

Alternatively, it could be treated as a form validation error like a closer match does:

image

Additional context

Related issues:

@twm twm added feature request requires triaging maintainers need to do initial inspection of issue labels Jul 7, 2024
@di di added bug 🐛 trusted-publishing and removed feature request requires triaging maintainers need to do initial inspection of issue labels Jul 7, 2024
@woodruffw
Copy link
Member

Thanks for the report @twm!

I agree this should be a form error, like the second screenshot you posted.

(A variant of this error will still be possible when a project with a too-similar name is created between the pending publisher's creation and use. But that should be much less common.)

@woodruffw
Copy link
Member

I've asked @DarkaMaul to take a look at fixing this 🙂

@twm
Copy link
Contributor Author

twm commented Jul 10, 2024

Thanks @woodruffw! I would also be happy to give it a go myself if that'd be helpful.

@woodruffw
Copy link
Member

No problem with me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants