RFR: 2190: Setting maximum size limit for PR diff in generating Webrev
Erik Joelsson
erikj at openjdk.org
Thu Mar 7 18:30:16 UTC 2024
On Mon, 4 Mar 2024 23:12:56 GMT, Zhao Song <zsong at openjdk.org> wrote:
> https://github.com/openjdk/tsan/pull/17, there are more than 5000 commits in this pr and mlbridge bot was trying to generate the webrev. The generation of webrev was successful but the webrev file was too big and exceeded GitHub's file size limit.
>
> So as ErikJ suggested, if the diff of the pr is too large, we shouldn't generate webrev for it.
bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/ArchiveMessages.java line 329:
> 327: "Changes: " + pr.changeUrl() + "\n" +
> 328: (webrev.diffTooLarge() ?
> 329: " Webrev: Webrev is not available because diff is too large\n" :
This string is repeated a lot, can we make it a constant, at least within this class?
webrev/src/main/java/org/openjdk/skara/webrev/Webrev.java line 210:
> 208: .mapToInt(Hunk::changes)
> 209: .sum();
> 210: return totalChanges > 300000;
Please make this a constant.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1617#discussion_r1516624970
PR Review Comment: https://git.openjdk.org/skara/pull/1617#discussion_r1516630783
More information about the skara-dev
mailing list