RFR: 49: Add forwarder bot

Erik Duveblad via github.com duke at openjdk.java.net
Wed Aug 7 14:15:42 UTC 2019


On Wed, 7 Aug 2019 12:17:59 GMT, Robin Westberg via github.com <duke at openjdk.java.net> wrote:

> On Wed, 7 Aug 2019 11:59:56 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:
> 
>> Hi all,
>> 
>> this patch adds a "forwarder" bot that can forward commits between repositories and or branches. This is useful for e.g. a sandbox use-case where we want to forwards commits from jdk:master to e.g. sandbox:master.
>> 
>> # Testing
>> - [x] Run `sh gradlew test` on Linux x86-64
>> - [x] Added two new unit tests for the bot
>> 
>> I also did some manual testing of the bots to ensure it successfully forwarded commits between two remote repositories.
>> 
>> ----------------
>> 
>> Commits:
>>  - 04f1d351:	49: Add forwarder bot
>> 
>> Pull request:
>> https://git.openjdk.java.net/skara/pull/40
>> 
>> Webrev:
>> https://webrevs.openjdk.java.net/skara/40/webrev.00
>> 
>> Patch:
>> https://git.openjdk.java.net/skara/pull/40.diff
>> 
>> Fetch command:
>> git fetch https://git.openjdk.java.net/skara pull/40/head:pull/40
> 
> bots/forward/src/main/java/org/openjdk/skara/bots/forward/ForwardBot.java line 69:
> 
>> 68:                 URLEncoder.encode(toHostedRepo.getUrl().toString(), StandardCharsets.UTF_8);
>> 69:             var toDir = scratchPath.resolve("forward").resolve(sanitizedUrl);
>> 70:             Repository toLocalRepo = null;
> 
> Perhaps it would be better to use permanent storage here (like the hgbridge) to avoid excessive copies when running concurrently.
> 
> PR: https://git.openjdk.java.net/skara/pull/40

Good idea, I pushed a new commit that utilizes shared storage instead.

PR: https://git.openjdk.java.net/skara/pull/40


More information about the skara-dev mailing list