From c180f8df137d05cc87013e16f6c0a1d2bf16523f Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Tue, 31 May 2022 12:28:38 +0200 Subject: [PATCH 1/2] #1803 ensure there's no race condition when modyfing compilation result comment --- .github/workflows/comment-on-pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/comment-on-pr.yml b/.github/workflows/comment-on-pr.yml index 82963f95f3..5c627cae37 100644 --- a/.github/workflows/comment-on-pr.yml +++ b/.github/workflows/comment-on-pr.yml @@ -4,6 +4,8 @@ on: repository_dispatch: types: comment-pr +concurrency: ${{ github.event.repository.name }}-${{ github.event.client_payload.pr_number }} + jobs: comment-on-pr: runs-on: ubuntu-latest From ed87229cb87d2c8116fd007bba364a25227cacd8 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Tue, 31 May 2022 16:52:49 +0200 Subject: [PATCH 2/2] #1803 correctly limit report characters per pipeline --- scripts/report_logs_in_comment.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/report_logs_in_comment.sh b/scripts/report_logs_in_comment.sh index 464c37fe24..05126a4b3c 100755 --- a/scripts/report_logs_in_comment.sh +++ b/scripts/report_logs_in_comment.sh @@ -8,12 +8,13 @@ # * puts a comment with both reports in PR thread on GitHub # # -# Why max_comment_size=64450 ? +# Why max_comment_size=3000 ? # # Maximum length of the comment body is 65536 characters. # https://github.community/t/maximum-length-for-the-comment-body-in-issues-and-pr/148867 # # Minus some decorations, comment's title, and additional description gives about 64.5k characters. +# There are 21 pipelines, so 64.5k/21 gives about 3k characters per pipeline. # # # What's going on with delimiter="-=-=-=-" and strange "%0D%0A"? @@ -94,7 +95,7 @@ fi # Concatenate both reports into one val="$warnings_errors""$delimiter""$delimiter""$tests_failures" -max_comment_size=64450 +max_comment_size=3000 if test ${#val} -gt "$max_comment_size" then val="${val:0:max_comment_size}%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <=="