ide icon indicating copy to clipboard operation
ide copied to clipboard

improve release to revert changes after build failed and abort

Open hohwille opened this issue 4 years ago • 0 comments

As a ide user, I want devon release to support a revert of my changes if the release failed reproducible so that I get back to a clean repo and do not mess things. Typically devon release will just work fine. However, we all know that sometimes things can go utterly wrong:

  • missconfiguration of settings.xml, etc. so login/password is missing or wrong, etc.
  • remote repository (e.g. nexus) is temporary down
  • internet/network outage
  • ...

What is already cool is that devon release will notice that the build failed and asks me if I want to retry it. Now if the error persists (e.g. I got 405 the entire day yesterday for OSSRH) you might need to give up by answering no to retry the build and abort the release. Currently this will leave you with a git repo containing the commit bumping the release version as well as the release tag. Therefore I currently reverted this manually in such cases. However, I already accidentally forgot this and pushed the commit bumping the release version what is rather bad. Finally, some users might be not experts with git and do not easily know how to reset the git state.

Therefore my demand is that devon release would do the following in case you are aborting the process after the release build failed:

git tag -d "release/${release_version}"
git reset --hard head~

It is open for discussion if --hard should be used but that is what I usually do to get entirely rid of the failed commit. To be even more safe devon release could tell before what he likes to do for you to revert the changes and asks for confirmation again. So we would avoid that some users could loose any information unintended (as did another comit in parallel on the same git repo whilst devon release was still running - this is quite odd but then we can say that the user has been informed and if he confirms it is himself to blame and not devonfw-ide).

hohwille avatar Jan 21 '21 15:01 hohwille