CI job log: enable/disable "scroll to top/bottom" buttons when expanding/collapsing log lines
Summary
When expanding/collapsing log lines in the CI job log viewer, the "scroll to top"/"scroll to bottom" buttons don't update.
Steps to reproduce
- Go to https://gitlab.com/gitlab-org/gitlab/-/jobs/10935719853
- Scroll to bottom (should be done automatically already)
- Collapse "Uploading artifacts for successful job"
- Expand "Uploading artifacts for successful job"
Example Project
see above
What is the current bug behavior?
The "scroll to bottom" button remains disabled.
What is the expected correct behavior?
The "scroll to bottom" button should become enabled, since the log is now longer than the page and thus, you could scroll to the bottom again.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
The button enable/disable logic is triggered in https://gitlab.com/gitlab-org/gitlab/-/blob/1a4d7c8e5df210b67ac6af9b9347a1e244f44b23/app/assets/javascripts/ci/job_details/job_app.vue#L167-170. The <log> component (https://gitlab.com/gitlab-org/gitlab/-/blob/1a4d7c8e5df210b67ac6af9b9347a1e244f44b23/app/assets/javascripts/ci/job_details/job_app.vue#L317) probably needs to emit an event when lines are collapsed/expanded, so that the updateScroll function can be called then.
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version
under the maintenance policy, please follow the steps on the
patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard
for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances,
refer to the internal release process for engineers.