craft icon indicating copy to clipboard operation
craft copied to clipboard

Quickly releasing multiple SDKs to Maven Central fails

Open adinauer opened this issue 11 months ago • 2 comments

Environment

Ran a release of Maven and Gradle plugin.

Steps to Reproduce

  1. Release Gradle plugin
  2. Release Maven plugin right after Gradle plugin release succeeded

Expected Result

Both releases work

Actual Result

Second release fails with:

Error:  There are more than 1 active repositories. Please close unwanted deployments.

Which seems to be coming from https://github.com/getsentry/craft/blob/1f5cca9e598bd33ed45704c2f7f1f7131401481b/src/targets/maven.ts#L694-L698

Maybe we could check the status of those open repositories as in the Sonatype UI it shows the staging repository with status "Released" including a note that it can safely be dropped.

As a workaround you can log into the "Sonatype Nexus OSS" UI and drop the staging repo manually after the first release.

adinauer avatar Feb 13 '25 14:02 adinauer

Also it seems running more than one release targeting Maven Central in parallel causes all of them to fail. Not sure there's anything we can do about that though.

adinauer avatar Feb 13 '25 14:02 adinauer

Maybe there's a way to have one repository per SDK / maven artifact to lower the chance of conflicts.

markushi avatar Feb 19 '25 13:02 markushi