409 from server: Conflict occurrs when publishing to GitHub Packages

I am facing following error intermittently when publishing to GitHub packages inside out GitHub actions workflows.

 * What went wrong:
Execution failed for task ':module-ballerina-openapi:publishMavenJavaPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'mavenJava' to repository 'GitHubPackages'
   > Could not PUT 'https://maven.pkg.github.com/ballerina-platform/ballerina-openapi/org/ballerinalang/module-ballerina-openapi/2.0.10/module-ballerina-openapi-2.0.10.zip.sha1'. Received status code 409 from server: Conflict

When we delete the package and re trigger same workflow it publishes successfully.

Initially we suspected our Gradle scripts that it would publish twice. Then as it works when re triggering by deleting the package or bumping next version, we were thinking could it be from Github packages side

5 Likes

Hello, I am facing the exact same issue. Did you manage to find a solution on this. We are using the gradle maven-publish plugin.

Same here, also using Gradle Maven publish

I am facing the exact same issue. It fails with random artifacts for me. Not always the same one, not even always during the same gradle task. :unamused:

I didn’t find a solution yet. As it happens intermittently for me we had to delete package and publish again

Same thing happening here as well. A package that was resolving properly in our builds stopped doing so about 6 hours ago. I tried deleting the package & republishing it but even then I’m getting a 409 Conflict error when trying to republish. This must be something from GitHub side, since for us it basically stopped working without doing anything.