Commit 75391d46 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

git-cl: Reword the message when surfacing traces to the user.

In crbug.com/955206 they pointed out that:
- It's not clear when to upload the issue
- It's not clear where to report it, or where to look for existing issues.
- It's not made clear that the traces can contain information the user might not want to share.

I've reworded the message to address those concerns

Bug: 955206
Change-Id: Ia1426007d389328eac52babeee1ec3782c2b104e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1606608
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
parent 74ca6920
......@@ -86,11 +86,16 @@ MAX_TRACES = 3 * 10
# traces we just collected.
TRACES_MESSAGE = (
'\n'
'When filing a bug for this push, be sure to include the traces found at:\n'
'A trace of this git-cl execution has been recorded at:\n'
' %(trace_name)s-traces.zip\n'
'Consider including the git config and gitcookies, which we have packed for \n'
'you at:\n'
' %(trace_name)s-git-info.zip\n')
'A redacted copy of your gitcookies file and git config has been recorded at:\n'
' %(trace_name)s-git-info.zip\n'
'If git-cl is not working correctly, please file a bug under the Infra>SDK\n'
'component, include the files above, and set the Restrict-View-Google label\n'
'so that they\'re not publicly accessible.\n'
'Review the files before upload. They might contain sensitive information\n'
'like reviewer emails, patchset titles, and the local path to your checkout.\n'
)
# Format of the message to be stored as part of the traces to give developers a
# better context when they go through traces.
TRACES_README_FORMAT = (
......
......@@ -1114,23 +1114,19 @@ class TestGitCl(TestCase):
calls += [
# Write a description with context for the current trace.
((['FileWrite', 'TRACES_DIR/20170316T200041.000000-README',
'Date: Thu Mar 16 20:00:41 2017\n\n'
'Change: https://%(short_hostname)s-review.googlesource.com/'
'q/%(change_id)s\n'
'Title: %(title)s\n\n'
'%(description)s\n\n'
'Execution time: 1000\n'
'Exit code: 0\n\n'
'When filing a bug for this push, be sure to include the traces '
'found at:\n'
' TRACES_DIR/20170316T200041.000000-traces.zip\n'
'Consider including the git config and gitcookies, which we have '
'packed for \nyou at:\n'
' TRACES_DIR/20170316T200041.000000-git-info.zip\n' % {
'Thu Mar 16 20:00:41 2017\n'
'%(short_hostname)s-review.googlesource.com\n'
'%(change_id)s\n'
'%(title)s\n'
'%(description)s\n'
'1000\n'
'0\n'
'%(trace_name)s' % {
'short_hostname': short_hostname,
'change_id': change_id,
'description': final_description,
'title': original_title,
'trace_name': 'TRACES_DIR/20170316T200041.000000',
}],),
None,
),
......@@ -1255,6 +1251,15 @@ class TestGitCl(TestCase):
lambda: datetime.datetime(2017, 3, 16, 20, 0, 41, 0))
self.mock(git_cl.tempfile, 'mkdtemp', lambda: 'TEMP_DIR')
self.mock(git_cl, 'TRACES_DIR', 'TRACES_DIR')
self.mock(git_cl, 'TRACES_README_FORMAT',
'%(now)s\n'
'%(gerrit_host)s\n'
'%(change_id)s\n'
'%(title)s\n'
'%(description)s\n'
'%(execution_time)s\n'
'%(exit_code)s\n'
'%(trace_name)s')
self.mock(git_cl.shutil, 'make_archive',
lambda *args: self._mocked_call(['make_archive'] + list(args)))
self.mock(os.path, 'isfile',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment