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

Publishing fails to release Sonatype repository #1682

Closed
kubukoz opened this issue Dec 14, 2022 · 4 comments
Closed

Publishing fails to release Sonatype repository #1682

kubukoz opened this issue Dec 14, 2022 · 4 comments
Labels
bug Something isn't working publish command

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Dec 14, 2022

Version(s)
0.1.18

Describe the bug

Seeing this when trying to publish a library:

Exception in thread "main" java.lang.Exception: java.lang.Exception: Failed to get https://s01.oss.sonatype.org/service/local/staging/profiles/44c2ce0e190826/promote (http status: 500, response: {"errors":[{"id":"*","msg":"Unhandled: Staging repository is already transitioning: orgpolyvariant-1045"}]})

Seeing the failure I checked Nexus and it claimed the repo is closed, so it just needed to be released. I did that manually in the Nexus UI and it seems to have worked.

To Reproduce

Given the nature of publishing it'd be kind of hard to reproduce reliably and independently, but I used this GitHub workflow. The repository at that state also contains the scala-cli config in use.

Expected behaviour
Publishing happens successfully

@kubukoz kubukoz added the bug Something isn't working label Dec 14, 2022
@kubukoz
Copy link
Contributor Author

kubukoz commented Dec 14, 2022

Looks like it worked the second time (hell, it worked for 3 Scala versions in a row!), so that must've been some sort of race condition / temporary quirk. Probably worth looking into, nevertheless

@MartinHH
Copy link

This just happened to me as well (Scala CLI version: 1.0.4) when I tried scala-cli publish . --native (from my local machine) with this configuration. I could reproduce this twice (dropped the staging repository and retried), then released manually in the UI (which seems to have worked).

It might be worth noting that between the first failure and the failing retries, I successfully executed scala-cli publish . --js (on first try), so I guess it's not caused by a totally random race condition.

@tgodzik
Copy link
Member

tgodzik commented Sep 25, 2023

@MaciejG604 is doing a PR for coursier publish which might help here https://github.com/coursier/publish/pull/17/files

@MaciejG604
Copy link
Contributor

This should be fixed by #2433 with coursier-publish retrying the staging repository operations on failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working publish command
Projects
None yet
Development

No branches or pull requests

5 participants