"Failed jobs" tab shows incomplete stacktraces
Summary
The Failed jobs
tab for a pipeline is not always helpful, because long stacktraces are not shown completely.
Steps to reproduce
Unclear, but probably any error that includes a stacktrace longer than 7 or 8 lines.
Example Project
What is the current bug behavior?
Summary begins in the middle with:
from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:25:in `start'
What is the expected correct behavior?
Summary should either not truncate the stacktrace (or only the middle) and start with:
bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
/usr/local/bundle/gems/danger-9.3.1/lib/danger/scm_source/git_repo.rb:114:in `raise_if_we_cannot_find_the_commit': Commit c8a2546a doesn't exist. Are you running `danger local/pr` against the correct repository? Also this usually happens when you rebase/reset and force-pushed. (RuntimeError)
Relevant logs and/or screenshots
See above.
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
Improve stacktrace detection, presumably in app/graphql/types/ci/job_trace_type.rb.
Edited by Katrin Leinweber (GTLB)