pypa / twine

Utilities for interacting with PyPI

Home Page:https://twine.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The upload --skip-existing command does not work on a Nexus Repository instance with a PostgreSQL database

StykMartin opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

nexus
PostgreSQL
skip-existing

Please describe why your using this option

Hello maintainers,

We recently migrated from OrientDB to the PostgreSQL database for Nexus Repository Pro (without upgrading Nexus version).
We noticed that the --skip-existing option does not work anymore.
The problem is that the response from Nexus Repository Pro contains different error messages depending on the DB.

OrientDB

Repository does not allow updating assets: pypi-hosted

PostgreSQL

pypi-hosted/packages/<package>/<version>/<package>-<version>-py3-none-any.whl cannot be updated

Current logic does not cover this behavior

# Nexus Repository OSS (https://www.sonatype.com/nexus-repository-oss)
or (status == 400 and any("updating asset" in x for x in [reason, text]))

Anything else you'd like to mention?

No response

Frankly you're paying for Nexus and they're giving two very different messages for the same error. Given how tenuous our ability to detect this already is, I'd strongly push on Nexus fixing this instead of us.