Collapsible sections do not work with more than 500.06 KiB of log
Summary
Using collapsible sections with collapsed=true
does not work if the job log is longer than the truncation limit of 500 kb.
In this case, the section is not rendered but instead the whole log is shown until it is truncated after 500 kb.
Unfortunately, collapsed sections are especially helpful in scenarios where you have these kinds of large logs.
Steps to reproduce
Set up the Gitlab CI like this
stages:
- test
Test Sections:
stage: test
script:
- echo -e "\e[0Ksection_start:`date +%s`:my_first_section[collapsed=true]\r\e[0KHeader of the 1st collapsible section"
# A command which generates a very long log
- cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 120 | head -n 10000 || true
- echo -e "\e[0Ksection_end:`date +%s`:my_first_section\r\e[0K"
- echo "SUCCESS"
Example Project
This is the CI file: https://gitlab.com/PhilLab/ci-testing/-/blob/602cf0887d4381a33fb00cc35616068eafd7bb91/.gitlab-ci.yml
and this is the job run: https://gitlab.com/PhilLab/ci-testing/-/jobs/1510094915
What is the current bug behavior?
The section is neither collapsed nor even rendered. Instead, the last 500 kb log lines are shown together with the usual remark
Showing last 500.06 KiB of log
What is the expected correct behavior?
The section should be collapsed
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com