RFR: 1669: Limit the amount of description copied into subsequent comment emails
Guoxiong Li
gli at openjdk.org
Fri May 5 20:01:57 UTC 2023
On Wed, 3 May 2023 21:21:42 GMT, Zhao Song <zsong at openjdk.org> wrote:
> A user complains about that sometimes the pr body can be very long and this very long pr body will be included in every email about this pr. The user will need to scroll down many times to the bottom of the email to find the useful information.
>
> In this patch, the length of **quoted** pr body or comment is limited to 2500.
The test case `MailingListBridgeBotTests#archiveDirectToIntegrated` failed in the `Pre-submit tests`. The [log](https://github.com/zhaosongzs/skara/actions/runs/4876601337/jobs/8700294843) is shown below. It is not normal because the it sent a http request to get the issue which should not occur in the test code.
MailingListBridgeBotTests > archiveDirectToIntegrated(TestInfo) FAILED
java.lang.IllegalStateException: [0]: not a valid start of a JSON value : <HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>
An error occurred while processing your request.<p>
Reference #27.d86bdc17.1683148864.42e2c0b9
</BODY></HTML>
at org.openjdk.skara.json/org.openjdk.skara.json.JSONParser.failure(JSONParser.java:43)
at org.openjdk.skara.json/org.openjdk.skara.json.JSONParser.parseValue(JSONParser.java:444)
at org.openjdk.skara.json/org.openjdk.skara.json.JSONParser.parse(JSONParser.java:464)
at org.openjdk.skara.json/org.openjdk.skara.json.JSON.parse(JSON.java:27)
at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest.parseResponse(RestRequest.java:369)
at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest.execute(RestRequest.java:492)
at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest$QueryBuilder.execute(RestRequest.java:213)//here
at org.openjdk.skara.issuetracker/org.openjdk.skara.issuetracker.jira.JiraProject.issue(JiraProject.java:439) // <-- here
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage.generateHTML(WebrevStorage.java:115)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage.createAndArchive(WebrevStorage.java:316)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage$1.generate(WebrevStorage.java:338)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.ArchiveItem.lambda$from$10(ArchiveItem.java:220)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.ArchiveItem.footer(ArchiveItem.java:471)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.ReviewArchive.generateNewEmails(ReviewArchive.java:359)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.ArchiveWorkItem.run(ArchiveWorkItem.java:381)
at org.openjdk.skara.test/org.openjdk.skara.test.TestBotRunner.runPeriodicItems(TestBotRunner.java:56)
at org.openjdk.skara.test/org.openjdk.skara.test.TestBotRunner.runPeriodicItems(TestBotRunner.java:43)
at org.openjdk.skara.test/org.openjdk.skara.test.TestBotRunner.runPeriodicItems(TestBotRunner.java:38)
at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.MailingListBridgeBotTests.archiveDirectToIntegrated(MailingListBridgeBotTests.java:531)
The reason about the failed test is:
The method `WebrevStorage#generateHTML` uses the real `JIRA` uri instead of the test config. And the `JIRA` is down at that time and returns unexpected `<HTML><HEAD><TITLE>Error</TITLE></HEAD>` which is the `html` format instead of the `json` format, so SKARA can't parse it. The method `WebrevStorage#generateHTML` needs to be adjusted and the failed test case is not related to this patch.
// method WebrevStorage#generateHTML
IssueTracker issueTracker = null;
try {
issueTracker = IssueTracker.from("jira", URI.create("https://bugs.openjdk.org"));
} catch (RuntimeException e) {
log.warning("Failed to create Jira issue tracker");
}
-------------
PR Comment: https://git.openjdk.org/skara/pull/1511#issuecomment-1536713910
More information about the skara-dev
mailing list