Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
When a spec fails relating to the cache, the job log can easily exceed the maximum length and make it harder to see the actual issue (e.g. https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/239803017).