-
Notifications
You must be signed in to change notification settings - Fork 308
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
The upload --skip-existing command does not work on a Nexus Repository instance with a PostgreSQL database #1044
Comments
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. |
Same issue with Nexus OSS (3.70.1-02) using the new embedded H2 database. html output
<!DOCTYPE html>
<html lang="en">
<head>
<title>400 - Sonatype Nexus Repository</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="icon" type="image/png" href="../../static/rapture/resources/safari-favicon-32x32.png?3.70.1-02" sizes="32x32">
<link rel="mask-icon" href="../../static/rapture/resources/favicon-white.svg?3.70.1-02" color="#00bb6c">
<link rel="icon" type="image/png" href="../../static/rapture/resources/favicon.svg?3.70.1-02" sizes="16x16">
<link rel="stylesheet" type="text/css" href="../../static/css/nexus-content.css?3.70.1-02"/>
</head>
<body>
<div class="nexus-header">
<a href="../..">
<div class="product-logo">
<img src="../../static/rapture/resources/nxrm-reverse-icon.png?3.70.1-02" alt="Product logo"/>
</div>
<div class="product-id">
<div class="product-id__line-1">
<span class="product-name">Sonatype Nexus Repository</span>
</div>
<div class="product-id__line-2">
<span class="product-spec">OSS 3.70.1-02</span>
</div>
</div>
</a>
</div>
<div class="nexus-body">
<div class="content-header">
<img src="../../static/rapture/resources/icons/x32/exclamation.png?3.70.1-02" alt="Exclamation point" aria-role="presentation"/>
<span class="title">Error 400</span>
<span class="description">Bad Request</span>
</div>
<div class="content-body">
<div class="content-section">
pypi-hosted/packages/<package>/<version>/<package>-<version>-py3-none-any.whl cannot be updated
</div>
</div>
</div>
</body>
</html> |
Same issue with Nexus OSS (3.71.0-06) using the new embedded H2 database. twine upload --verbose --skip-existing ./wheels/*<!DOCTYPE html>
<html lang="en">
<head>
<title>400 - Sonatype Nexus Repository</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="icon" type="image/png" href="../../static/rapture/resources/safari-favicon-32x32.png?3.71.0-06" sizes="32x32">
<link rel="mask-icon" href="../../static/rapture/resources/favicon-white.svg?3.71.0-06" color="#00bb6c">
<link rel="icon" type="image/png" href="../../static/rapture/resources/favicon.svg?3.71.0-06" sizes="16x16">
<link rel="stylesheet" type="text/css" href="../../static/css/nexus-content.css?3.71.0-06"/>
</head>
<body>
<div class="nexus-header">
<a href="../..">
<div class="product-logo">
<img src="../../static/rapture/resources/nxrm-reverse-icon.png?3.71.0-06" alt="Product logo"/>
</div>
<div class="product-id">
<div class="product-id__line-1">
<span class="product-name">Sonatype Nexus Repository</span>
</div>
<div class="product-id__line-2">
<span class="product-spec">OSS 3.71.0-06</span>
</div>
</div>
</a>
</div>
<div class="nexus-body">
<div class="content-header">
<img src="../../static/rapture/resources/icons/x32/exclamation.png?3.71.0-06" alt="Exclamation point" aria-role="presentation"/>
<span class="title">Error 400</span>
<span class="description">Bad Request</span>
</div>
<div class="content-body">
<div class="content-section">
pip-alpine/packages/django/5.0.8/Django-5.0.8-py3-none-any.whl cannot be updated
</div>
</div>
</div>
</body>
</html>
ERROR HTTPError: 400 Bad Request from
https://localhost/repository/pip-alpine/
pip-alpine/packages/django/5.0.8/Django-5.0.8-py3-none-any.whl cannot be updated |
Since the FOSS version is now affected, I think we should address this issue. I'll look into it and provide a patch to fix it. |
Glad to hear you're sending a fix to Nexus now that their broken code is open source |
Confirming here on Nexus-OSS v3.37.0-12 with embedded H2 db. It seems like the changed output is since >=v3.71.0, everything before that also supported the OrientDB which is deprecated since then. @StykMartin any luck on cooking up a patch? |
@WatskeBart |
Is there an existing issue for this?
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
PostgreSQL
Current logic does not cover this behavior
twine/twine/commands/upload.py
Lines 64 to 65 in fe1885f
Anything else you'd like to mention?
No response
The text was updated successfully, but these errors were encountered: