BreadMoirai / github-release-gradle-plugin

A Gradle Plugin to send Releases to Github
Apache License 2.0
108 stars 26 forks source link

Don't silently consume Exceptions when uploading assets #57

Open soundasleep opened 1 year ago

soundasleep commented 1 year ago

This should resolve #34

BreadMoirai commented 1 year ago

So the previous implementation philosophy is that because there's no current implementation to "cancel the release" in this plugin, we just attempt to power through and even if the release is incomplete, keep it as complete as possible.

What's the new intended behavior here?

the function uploadAssetsToUrl does not currently throw any exceptions if github api rejects the upload...

soundasleep commented 1 year ago

Every now and again the upload fails (in my case, because there's already an asset released with the same filename), but the build says it's successful.

This can cause issues down the line, e.g. devs getting confused, later actions failing or working with an inconsistent state, all of which are really expensive to debug!

If there's an error during release, the dev/build should be notified, or at least have the option to be notified, rather than assuming everything is OK.

If you still want to keep this behaviour, what if we could provide a ignoreExceptions = false parameter to the config so that devs could choose to enable early failure?

BreadMoirai commented 1 year ago

You can add an exception in the uploadAssetsToUrl at the end if any of the assets failed. That way we can attempt all the files and mark the task as failed if any of the uploads didn't succeed,

runningcode commented 1 year ago

Hey there! Any movement on this PR? We are also facing the same issue.