Skip to content
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

Report state=closed, transitioning=false as "artifact already published" #155

Closed
nedtwigg opened this issue Feb 5, 2023 · 3 comments · Fixed by #157
Closed

Report state=closed, transitioning=false as "artifact already published" #155

nedtwigg opened this issue Feb 5, 2023 · 3 comments · Fixed by #157

Comments

@nedtwigg
Copy link

nedtwigg commented Feb 5, 2023

I just triggered a deployment which failed

Googling around led me to

Which had the very helpful info

The build failed because those artifacts had previosly been published! Only the Linux-based ones were missing.

And in fact that turned out to be my problem too! I kicked off deployment on a stale branch 👎

It would be helpful if the error message for state=closed, transitioning=false had a hint like "This probably means you have already published artifacts with these names and versions."

I'd be happy to submit a PR for this, but I'm a bit afraid the project has died, because #152 is important and easy to fix and is remaining unfixed. Thanks very much for making this, you've got no obligation to keep maintaining it! But if you do get around to fixing #152, I promise to come back and submit a little PR for better error messages if you'd like it :)

@szpak
Copy link
Contributor

szpak commented Feb 5, 2023

In fact, in the error message there is:

It is unexpected. Please check Nexus logs using its web interface - it can be caused by validation rules violation.

Did the error reported in Nexus explain why it happened in your case?

In general, there could be some other cases to fail on the Nexus/Sonatype validation, but I agree the duplicated versions/artifacts are probably the most common, so the error message could be improved.

@nedtwigg
Copy link
Author

nedtwigg commented Feb 5, 2023

I couldn't figure out how to find the logs, but definitely the problem was the duplicate version, once I ran the job from the correct branch it worked. The setup had worked unchanged for a long time until this.

@szpak
Copy link
Contributor

szpak commented Feb 5, 2023

Next time, after the aforementioned failure, go to https://oss.sonatype.org/ , log in, find your staging repository (by name) there and check its status (in the lower panel). There are several validation checks in Sonatype release policy and one of them is most likely failed, with a clear error message.
I believe, there was even a proposal to try get that error message from Nexus (however, we don't use that API yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants