gradle / plugin-portal-requests

Gradle Plugin Portal issues and requests.
https://plugins.gradle.org/
12 stars 8 forks source link

Cannot republish the the same version if the previous attempt was unsuccessful/broken #239

Closed mahozad closed 2 months ago

mahozad commented 2 months ago

I tried to publish v0.7.0 of this plugin and the task failed after some time passed. When tried to republish the same version I got the below error:

Failed to post to server.
Server responded with:
Plugin: 'ir.mahozad.compose-exe-manifest', version: '0.7.0' exists already. ...

I then bumped the version to v1.0.0 and then tried to upload the new version, and the upload once again failed:

> Task :plugin:assemble UP-TO-DATE
> Task :plugin:generateMetadataFileForPluginMavenPublication
> Task :plugin:generatePomFileForPluginMavenPublication
> Task :plugin:publishPlugins
> Task :plugin:publishPlugins FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugin:publishPlugins'.
> java.io.IOException: Unexpected HTTP response while uploading C:\Users\Mahdi\IdeaProjects\compose-exe-manifest\plugin\build\libs\plugin-1.0.0-sources.jar: 403 Forbidden

The latest version visible and usable is still 0.6.0. I'm afraid if I try to publish the plugin with a new version I will once again encounter error.

Please make it possible to publish the same version if it was broken or provide a way to be able to approve the publication or throw it away on the website.

There are many related issues: #230, #183, #138, #116, #109, #72, #68, #46, #40

Expected Behavior

Should be able to republish and override a version that was uploaded partially or unsuccessfully.

Current Behavior

The publication fails with error.

Context

Your Environment

I'm using Gradle 8.10 and plugin publish 1.2.2 on Windows 11.

I'm also using SSH port forwarding and set the Gradle to use the socks proxy in the project gradle.properties: (because I'm in a region where accessing Gradle servers may be restricted)

systemProp.socksProxyHost=127.0.0.1
systemProp.socksProxyPort=14395
ljacomet commented 2 months ago

Hey,

Sorry for the inconvenience. I have cleaned up the failed deployments. I'll leave this issue open until you confirm you were able to upload a new version.

mahozad commented 2 months ago

Thank you. The new version was published. But, please fix the underlying problem.

ShreckYe commented 1 month ago

Hello, I just encountered the same problem. Please help me remove all plugins of version "0.6.0" under the package com.huanshankeji. (Or shall I open a separate issue for this?)

I thnk @mahozad's request in "Expected Behavior" is quite valid: one "should be able to republish and override a version" within a specific time window, maybe of a shorter range, such a 1 day or even 1 hour for such automated tasks, instead of 7 days for manual deletion, if there is a concern of breaking builds. There can be a task such as publishPluginsOverride or achieve this. Or alternatively, there can be a deletePublishedPlugins/removePublishedPlugins task to help one delete the published plugins and the POM within the time window since it's a lot of work to delete them manually if there are tens of them.