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

Add --skip-existing option to poetry publish #2254

Closed
2 tasks done
jonathanunderwood opened this issue Apr 1, 2020 · 8 comments · Fixed by #2812
Closed
2 tasks done

Add --skip-existing option to poetry publish #2254

jonathanunderwood opened this issue Apr 1, 2020 · 8 comments · Fixed by #2812
Labels
area/publishing Related to PyPI/PEP 503 publishing kind/feature Feature requests/implementations

Comments

@jonathanunderwood
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

The twine tool for publishing to PyPi style repos has a very useful option --skip-existing for the twine upload command. This option basically says "don't error out if a file already exists on PyPi, continue to the next".

This is super useful in a number of cases, including with CI/CD pipelines where, on branching, the pipeline will trigger a build for the new branch, but of course that first build will already have a corresponding package in PyPi as the commit it's being built from has already been built on the branch that the new branch was created from. In that case, it's fine for the pipeline to fail to upload the file as it already exists.

There are various other use cases for this flag. Could we have an equivalent flag for poetry publish ?

@jonathanunderwood jonathanunderwood added the kind/feature Feature requests/implementations label Apr 1, 2020
@finswimmer finswimmer added the area/publishing Related to PyPI/PEP 503 publishing label Apr 1, 2020
@kasteph kasteph added the status/triage This issue needs to be triaged label Apr 13, 2020
@davidszotten
Copy link
Contributor

would you accept a patch that adds this?

@abn
Copy link
Member

abn commented Aug 14, 2020

@davidszotten feel free to propose an implementation for this. You can either create a draft PR to discuss implementation or mention how you would want to approach this here. A few things that comes to mind:

  1. Would this mean that we ignore all errors?
  2. Can we identify "existing" vs "other error" accurately?
  3. How do we handle other errors if this flag is set?

Happy to help review etc.

@davidszotten
Copy link
Contributor

i would probably do something similar to twine (heuristics for a few package index implementations that try to detect this particular error)

i explicitly don't want to ignore all errors, only "this file already exists"

davidszotten added a commit to davidszotten/poetry that referenced this issue Aug 15, 2020
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Aug 15, 2020
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Aug 17, 2020
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
@Casyfill
Copy link

Any hope to get this feature? Can't find discussion on what happened to above.. 😟

davidszotten added a commit to davidszotten/poetry that referenced this issue Apr 28, 2021
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Jun 17, 2021
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Jul 9, 2021
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Jul 17, 2021
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
@Incognito
Copy link

How can I help get this feature merged?

davidszotten added a commit to davidszotten/poetry that referenced this issue Jul 22, 2021
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
@Leem0sh
Copy link

Leem0sh commented Sep 17, 2021

Even tho I really like this project I'm forced to use twine for publishing generated clients :( This would be awesome to merge!

@KRunchPL
Copy link

I agree that this feature would be great. The PR looks good too me (although I did not check all possible responses :) ).

davidszotten added a commit to davidszotten/poetry that referenced this issue Mar 24, 2022
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Mar 26, 2022
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Mar 27, 2022
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
davidszotten added a commit to davidszotten/poetry that referenced this issue Mar 28, 2022
add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves python-poetry#2254
radoering pushed a commit that referenced this issue Mar 29, 2022
* dry_run is never None

* add --skip-existing to publish

add `--skip-existing` option to publish command to continue if an upload
fails due to the file already existing. this is helpful in e.g. ci
settings. resolves #2254
@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 11, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/publishing Related to PyPI/PEP 503 publishing kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants