Hi,
I noticed that the Maven publishing script currently prints an error message when a PUT request fails, but it does not exit with a non-zero status code.
For example, if uploading the .zip, .sha256, or .md5 file fails, the script only does:
print(f"Error: {response.status_code} - {response.content.decode()}")
Because of this, CI/CD workflows may still treat the publish step as successful even though one or more artifacts were not actually uploaded.
Suggested improvement:
- Track whether any upload failed
- Exit with a non-zero status code if any request fails
- Optionally skip checksum uploads if the main
.zip upload fails
- Consider accepting other successful status codes such as
204
- Add a request timeout to avoid hanging indefinitely
Example behavior:
if response_zip.status_code not in (200, 201, 204):
print(...)
exit(1)
This would make failures easier to detect in automated release workflows and prevent partially published artifacts from being treated as successful.
Thanks!
Hi,
I noticed that the Maven publishing script currently prints an error message when a
PUTrequest fails, but it does not exit with a non-zero status code.For example, if uploading the
.zip,.sha256, or.md5file fails, the script only does:Because of this, CI/CD workflows may still treat the publish step as successful even though one or more artifacts were not actually uploaded.
Suggested improvement:
.zipupload fails204Example behavior:
This would make failures easier to detect in automated release workflows and prevent partially published artifacts from being treated as successful.
Thanks!