Skip to content

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

Closed

Description

@jonathanunderwood
  • 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 ?

Activity

  1. davidszotten commented on Aug 14, 2020

    @davidszotten
    Contributor

    would you accept a patch that adds this?

  2. abn commented on Aug 14, 2020

    @abn
    Member

    @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.

  3. davidszotten commented on Aug 14, 2020

    @davidszotten
    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"

  4. added 3 commits that reference this issue on Aug 15, 2020
    1dc8c81
    86d7998
    a530706
  5. Casyfill commented on Mar 28, 2021

    @Casyfill

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

  6. added a commit that references this issue on Apr 28, 2021
    afb0060
  7. added a commit that references this issue on Jun 17, 2021
    383e3cc
  8. added a commit that references this issue on Jul 9, 2021
    0a1c0f2
  9. added a commit that references this issue on Jul 17, 2021
    121ce51
  10. Incognito commented on Jul 19, 2021

    @Incognito

    How can I help get this feature merged?

  11. added a commit that references this issue on Jul 22, 2021
    d66395f
  12. Leem0sh commented on Sep 17, 2021

    @Leem0sh

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

  13. KRunchPL commented on Oct 31, 2021

    @KRunchPL

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

  14. added 4 commits that reference this issue on Mar 24, 2022
    8a75e9a
    7e32ad3
    ea2cba1
    d821a43
  15. added a commit that references this issue on Mar 29, 2022
    cf8999f
  16. github-actions commented on Mar 1, 2024

    @github-actions

    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.

  17. locked as resolved and limited conversation to collaborators on Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/publishingRelated to PyPI/PEP 503 publishingkind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions