Make job logs line shareable
Problem to solve
I'm often trying to show someone a particular line in the job output, and have to guide them through finding it. If there was a line number, I could simply say "look at line 149". If those line numbers were link anchors, that would be even better because then you can just provide a link to the exact problem.
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
Users can easily share sections of the build log, with one another helping to debug of the job log. This can/should work similarly to sharing lines of code for example: https://gitlab.com/gitlab-org/gitlab-ce/blob/4047e5b8275490288e7ce38ae48e3f7248e5daf8/lib/banzai.rb#L19-21
We shouldn't rely use line numbers since we show up to 5000kb and the job logs can be updated at any time, so line 1 can be the actual beginning of the log or actually in the middle of the log which can be very confusing. Instead, we should use a byte offset/limit so that backend can create the correct link and find the right part of the log.
Permissions and Security
- Anyone who can see the build log should be able to create the link
- Anyone who can see the build log should be able to load the link
- Show to link to part of the build log
What does success look like, and how can we measure that?
Users can easily share parts of the build log with one another
Links / references
Originally proposed in gitlab-runner#2412 (closed)