Return a non-zero exit code when publishing to a repository fails
See original GitHub issueContext: Using Poetry in Build (CI/CD) systems. While using Poetry to upload a wheel file to Sonatype Nexus repository, Repository throws a 400 error if the wheel file with the same version is already available in the repository.
Example: poetry publish $private_nexus_url --build
- Builds a wheel file my_wheel_file_0.1.0
- Uploads the wheel file to Nexus Repository => Version on Nexus: my_wheel_file_0.1.0
Run again without updating the version, i.e the project’s version is still 0.1.0 poetry publish $private_nexus_url --build
- Builds a wheel file my_wheel_file_0.0.1
- Tries to upload the wheel file my_wheel_file_0.0.1 to Nexus Repository and returns an error message.
- “poetry publish” fails silently by displaying the error message.
Error message:
[HTTPError]
400 Client Error: Repository does not allow updating assets: pypi-internal
or url: <private repository url>
Improvement/Bug: In the context of CI/CD systems, a non-zero exit code along with error message is required else the build systems fail silently without uploading the latest artifact. Exit with a non zero code along with error message
Note: We could configure Nexus to allow republishing the same artifact version again.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What does 'nonzero return code 128' in github actions mean?
If there are no tags it can use, then Git will exit with status code 128 so that users can easily detect that...
Read more >Build failed due to a user error: Build script returned non-zero ...
Hello , I'm facing this issue Build failed due to a user error: Build script returned non-zero exit code: 2. and I can't...
Read more >Configuring CircleCI
By default, CircleCI will execute job steps one at a time, in the order that they are defined in config.yml , until a...
Read more >Upon browsing a specific repo, an "500 exited with code 0 ...
The error is caused by a missing .gitmodules file that git could not find for some reason. When a repo with submodules is...
Read more >Steps - drone docs
The root of your git repository, also called the workspace, is shared by all ... If a command returns a non-zero exit code,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Publishing with wrong credentials ends up in the same behavior
Version
0.12.12
has just been released!