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

PyPI release does not fail when it already exists. #671

Open
germa89 opened this issue Jan 23, 2025 · 4 comments
Open

PyPI release does not fail when it already exists. #671

germa89 opened this issue Jan 23, 2025 · 4 comments

Comments

@germa89
Copy link
Contributor

germa89 commented Jan 23, 2025

So... yesterday I tried to do a "quick" release (disclaimer, it is never quick on PyMAPDL).

And I forgot to update the pyproject.toml to the new version (yeeeeahhh.. I know...), however the tag was correct. Hence I had tag with v0.69.2 and the pyproject.toml with v0.69.1.

Surprisingly, the CICD didn't fail, hence I didn't realise (thanks @greschd for letting me know).

Shouldn't the workflow fail? It is showing a warning though.

Image

One could argue that it is ok in case you want to attach new files after the release is done. Is this something we want to support??

Reference: https://github.com/ansys/pymapdl/actions/runs/12891417279/job/35962119607#step:3:994

@germa89
Copy link
Contributor Author

germa89 commented Jan 23, 2025

Side-quest

Can we have something that checks whether the tag and the pyproject.toml file are aligned? Some dumbass people (me) would appreciate it a lot 😅

(I can do the implementation)

@RobPasMue
Copy link
Member

RobPasMue commented Jan 23, 2025

If you are using the trusted publisher approach there are many flags we could consider exposing for this purpose. Using the twine PAT approach to upload in combination with these flags would also be possible but we would have to handle it ourselves I believe. Doable in any case - I like the idea of letting projects decide whether they want to prevent re-upload or not.

@MaxJPRey
Copy link
Contributor

That is a good idea.
Yes, I would also be in favor of adding the "option" to re-upload and by default, it should not let you do so.

@jorgepiloto
Copy link
Member

jorgepiloto commented Jan 30, 2025

I am not sure that re-upload is available. If the package already exists in the index, the action fails. That's why skip-existing option exists.

Maybe, we could add a checker for this. To ensure that the versions in the tag and in the package agree.

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

No branches or pull requests

4 participants