commit | b95d921d6db891dc724f619d957ab35e634f7e44 | [log] [tgz] |
---|---|---|
author | Saša Živkov <sasa.zivkov@sap.com> | Fri Oct 12 14:21:38 2018 +0200 |
committer | Saša Živkov <sasa.zivkov@sap.com> | Wed Nov 21 17:33:21 2018 +0100 |
tree | 67c05d6a98692063d7fc013820081f4393efd53f | |
parent | d559df8af015e3f436be213c3f5d726fb40f0f5d [diff] |
Consistently handle remote repository creation failures Failure to create remote repository was handled inconsistently in the three existing AdminApi implementations. This issue was present in the code even before the refactoring done in Ie760bf3e143b1d143b6e81ac6cfa816ef1f8d016. For example, creation of remote repository over SSH [1] didn't return a status back to the caller, while the Gerrit+SSH implementation [2] did return a boolean flag which was afterwards ignored by the caller [3]. Not handling remote repository creation failures had an ugly effect: we log the "Missing repository created; ..." [4], even if the repository creation failed. Let all three implementations of the AdminApi return a flag indicating the success/failure and make sure to handle it properly. Further, remove some redundant and potentially confusing parts of the log messages as they assume that failure to create missing repository can only be caused by using wrong protocol. [1] https://gerrit.googlesource.com/plugins/replication/+/d557ccc642c59a55750f560ce0d98870e1550d65/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java#290 [2] https://gerrit.googlesource.com/plugins/replication/+/d557ccc642c59a55750f560ce0d98870e1550d65/src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java#43 [3] https://gerrit.googlesource.com/plugins/replication/+/d557ccc642c59a55750f560ce0d98870e1550d65/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java#259 [4] https://gerrit.googlesource.com/plugins/replication/+/092792edacf9c29732a560a30967b92664cd65f9/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java#400 Change-Id: I6566f867138ab73c81ff7a67630772c3734e501b