axion-release-plugin
axion-release-plugin copied to clipboard
Issue with pushRelease task error handling
Bug When pushRelease is called and a tag that you are trying to push already exists on remote repo it fails with an unrelated error:
:pushRelease Pushing all to remote: origin Exception occurred during push: org.eclipse.jgit.api.errors.TransportException: ssh://git@*****: USERAUTH fail :pushRelease FAILED
How to simulate
- Create a new tag on remote for example release-0.1.1
- On local repo run ./gradlew createRelease -Prelease.disableRemoteChecks
- It is important not to fetch tags from the remote so on the local branch you have the same tag to push that is on remote
- Run ./gradlew pushRelease -Prelease.disableChecks The error is org.eclipse.jgit.api.errors.TransportException: ssh://git@****: USERAUTH fail but it has nothing to do with the original root cause
History There was a change in the error handling for pushRelease task since version 1.8.1. Commit 029d3371abfc243a19a2b7e8d62a86fb0eaf5e57 Before that change, when this error occurred, it was just ignored. Now it fails, but with an unrelated error message
Thanks for reporting, i will try to fix it (add meaningful err message) next week.
I tried to reproduce the issue in tests (using "real" remote repo in Docker), but it seems like in my test setup everything works fine: push gets rejected when tag exists on some other commit. No exception is thrown.
Could you take a look at the test code and tell me if i'm missing something? It's on this branch. You can run tests with ./gradlew remoteTest, but you need to have dockerd on your system.
Thank for looking into this Adam. I'm currently on vacation without access to my laptop. I'll look into it when I return in one week.
сб, 4 авг. 2018 г. в 12:52, Adam Dubiel [email protected]:
I tried to reproduce the issue in tests (using "real" remote repo in Docker), but it seems like in my test setup everything works fine: push gets rejected when tag exists on some other commit. No exception is thrown.
Could you take a look at the test code and tell me if i'm missing something? It's on this branch https://github.com/allegro/axion-release-plugin/compare/test_pushing_with_existing_tag?expand=1. You can run tests with ./gradlew remoteTest, but you need to have dockerd on your system.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/allegro/axion-release-plugin/issues/254#issuecomment-410441280, or mute the thread https://github.com/notifications/unsubscribe-auth/AXMOwr1i5Esyi1Lf_1u33nzZcFgau-Woks5uNXztgaJpZM4VX3dM .
Sorry for delay Adam. I will try to look into it tomorrow.
Any luck with this one? :)