D22399: prevent exhausting the maximum size of bug reports

Harald Sitter noreply at phabricator.kde.org
Thu Jul 11 14:23:02 BST 2019


sitter created this revision.
sitter added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION SUMMARY
  bugzilla has a hardcoded server-side limit for how large a given comment
  may be. this can somewhat easily get triggered by heavily threaded
  applications as the backtrace would include a lot of "noise" threads.
  when this previously happened drkonqi would find itself incapable of
  filing the report and leaving the user to their own devices.
  
  now we are much smarter about this
  if the reportinterface finds that the bug description is too long it will
  try to use a reduced backtrace (only a couple of lines from the relevant
  thread) or when that too is too long to exclude the backtrace entirely.
  in both events it would then additionally attach the complete backtrace
  to the bug.
  
  for this there's a bunch of rejiggering necessary:
  
  - generateReportFullText has had its signature changed, instead of using a lazy bool now use enums to control the output. this should be vastly more readable
  - new Backtrace control on generateReportFullText ranging Complete> Redcued>Exclude
  - addedToCC was renamed to attachBacktraceWithReport which is a more suitable name for what it does. it's logic has been moved to a new attachBacktrace which requires the caller to set the actual comment
  - attachBacktrace is called with a full report comment when used via \ attachBacktraceWithReport (i.e. the user indicated that their crash is in fact the same as another report, so their report gets attached to the other one). it's called with a simplified message when attaching as part of a reduced/excluded backtrace dance
  
  the end result is that the reports can no longer exhaust the hardcoded
  character limit.
  
  there is one caveat: the user can still write a super long description
  manually and exhaust the limit. this is however very hard to do in
  real life without "abusing" the description for something.
  
  CHANGELOG: Bug reporting can no longer exhaust the maximum character size enforced by Bugzilla
  BUG: 248807
  FIXED-IN: 5.17.0

TEST PLAN
  - file bug report with ETOOLONGTRACE -> gets reduced and attached
  - regular attaching still works
  - exhausting the limit *exactly* works as expected

REPOSITORY
  R871 DrKonqi

BRANCH
  trace-exclude

REVISION DETAIL
  https://phabricator.kde.org/D22399

AFFECTED FILES
  src/bugzillaintegration/reportassistantdialog.cpp
  src/bugzillaintegration/reportassistantpages_base.cpp
  src/bugzillaintegration/reportassistantpages_bugzilla.cpp
  src/bugzillaintegration/reportinterface.cpp
  src/bugzillaintegration/reportinterface.h

To: sitter, #plasma
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190711/1f2a6bb7/attachment.html>


More information about the Plasma-devel mailing list