CI job links with line number anchor always scroll to the bottom of the logs
Summary
When linking to a specific CI job's output, it is possible to add a line number anchor to the URL. Example: https://gitlab.com/gitlab-org/gitlab/-/jobs/477506570#L33
When browsing to such URLs, the job's logs should be automatically scrolled to the specified line number (33
in this case) once the logs are one loading. However, this doesn't seem to work at the moment. When loading a job's output, it is always scrolled all the way to the bottom and it seems to be ignoring the line number anchor altogether.
Quoting @tmaczukin from a Slack discussion:
Something definitely happened with the linking. In the past it was linking directly to the selected line, even after the job trace was lazy-loaded.
Now it's scrolled to the bottom. However, the linking is still valid - if you will put the cursor in address bar (where the .../job/1234#L123 address is) and hit enter, then it will scroll to the proper line.
So something happened with handling the lazy-loading of job's log.
Steps to reproduce
- Open any CI job's details page.
- Click on some line number in the output, this should add the anchor to the address bar.
- Copy the URL with the line number anchor from the address bar.
- In a new page, paste & go to the copied URL
Example Project
Any project with CI jobs.
What is the current bug behavior?
CI job's logs are being scrolled down to the bottom of the output.
What is the expected correct behavior?
Logs should be scrolled to the specified line number anchor once the output is loaded.