New issue
Advanced search Search tips

Issue 725959 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

[WPT Export] Export is failing due to git author error

Project Member Reported by jeffcarp@chromium.org, May 24 2017

Issue description

In recent build
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.infra.cron%2Fwpt-exporter%2F20873%2F%2B%2Frecipes%2Fsteps%2Fcreate_PR_or_merge_in-flight_PR%2F0%2Fstdout

Found Gerrit in-flight CL: "Add SecureContext to WebUSB interfaces" https://chromium-review.googlesource.com/c/508111
No in-flight PR found for CL. Creating...
Deleting old branch chromium-export-cl-I1aece5c10ffae3e4fafbbb19f10fad5f42c8a312
Creating local branch chromium-export-cl-I1aece5c10ffae3e4fafbbb19f10fad5f42c8a312
Traceback (most recent call last):
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/wpt-export", line 92, in <module>
    main()
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/wpt-export", line 87, in main
    dry_run=args.dry_run
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 40, in run
    self.process_gerrit_cls(open_gerrit_cls)
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 75, in process_gerrit_cls
    self.create_or_update_pull_request_from_cl(cl)
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 200, in create_or_update_pull_request_from_cl
    self.local_wpt.create_branch_with_patch(branch_name, message, patch, cl.owner_email, force_push=True)
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py", line 97, in create_branch_with_patch
    self.run(['git', 'commit', '--author', author, '-am', message])
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py", line 44, in run
    return self.host.executive.run_command(command, cwd=self.path, **kwargs)
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 351, in run_command
    (error_handler or self.default_error_handler)(script_error)
  File "/b/rr/tmpOcX8FJ/w/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 259, in default_error_handler
    raise error
webkitpy.common.system.executive.ScriptError: Failed to run "['git', 'commit', '--author', u'chasej@chromium.org', '-am', u'Add SecureContext to WebUSB interfaces\n\nAdd the [SecureContext] attribute to all of the WebUSB interfaces, so\nthey are not exposed to insecure contexts. This change was dependent on\nfixing the combination of [OriginTrialEnabled] and [SecureContext], as\nwell as [SecureContext] on interfaces.\n\nBug: 695123\nChange-Id: I1aece5c10ffae3e4fafbbb19f10fad5f42c8a312\nReviewed-on: https://chromium-review.googlesource.com/508111\nCr-Commit-Position: refs/heads/master@{#474310}\nWPT-Export-Revision: 490eee4b140f19216ec28138c7fe89e50aa8bd3b']" exit_code: 128 cwd: /tmp/wpt
output: fatal: --author 'chasej@chromium.org' is not 'Name <email>' and matches no existing author
step returned non-zero exit code: 1

I'm trooper today and tomorrow so I'll get to this when I can.
 
Description: Show this description
Cc: cha...@chromium.org
First thing I'm thinking about based on this message, is: when create_branch_with_patch is called with an author, does the author normally always have the format "Name <email>"? I guess "Name <email>" is always required, eh?

ChromiumCommit.author() calls:
  ['git', 'show', '--format="%aN <%aE>"', '--no-patch', self.sha]

So given that there's an author email for the commit, that format seems like it should match.

But that's an interesting commit message because it says it's reviewed at https://chromium-review.googlesource.com/508111, which is not committed, but it says the commit position should be r474310 (and AFAIK there should be no commit position for uncommitted CLs)...


Next thing I'm wondering here is: Is this blocking export of already-committed CLs? If so, I think the first action here is to change exporter so that errors while creating PRs for CLs doesn't block exporting committed CLs (since unexported committed CLs block import, but uncommitted CLs with no export PR are not a problem for import).
Yes it's blocking export of already committed CLs. I'll create a bug for that.

Looks like an update to Git might have caused it:
https://stackoverflow.com/questions/26318375/fatal-no-existing-author-found-with-xxx

I changed the author format to be "email <email>" and that worked. I ran the exporter locally and it created the PR for that CL:
https://github.com/w3c/web-platform-tests/pull/6037

I'll create a CL for that as a quick fix.
Project Member

Comment 5 by bugdroid1@chromium.org, May 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d07ebbbc3d8f0039fb8cbb76952c0aee94c8437f

commit d07ebbbc3d8f0039fb8cbb76952c0aee94c8437f
Author: Jeff Carpenter <jeffcarp@chromium.org>
Date: Wed May 24 21:32:12 2017

[WPT Export] Update git author format to fix prod issue

Bug:  725959 
Change-Id: I026bf2e238280dcd455f3afe9ddbc08c89608bb1
Reviewed-on: https://chromium-review.googlesource.com/513400
Commit-Queue: Jeff Carpenter <jeffcarp@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#474430}
[modify] https://crrev.com/d07ebbbc3d8f0039fb8cbb76952c0aee94c8437f/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py
[modify] https://crrev.com/d07ebbbc3d8f0039fb8cbb76952c0aee94c8437f/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py

This is still happening but in a different way:
https://build.chromium.org/p/chromium.infra.cron/builders/wpt-exporter/builds/21156

Deleting old branch chromium-export-42110b2227
Creating local branch chromium-export-42110b2227
Author: "meade <meade@chromium.org>"
Traceback (most recent call last):
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/wpt-export", line 92, in <module>
    main()
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/wpt-export", line 87, in main
    dry_run=args.dry_run
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 52, in run
    self.create_pull_request(exportable_commit)
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 160, in create_pull_request
    self.local_wpt.create_branch_with_patch(branch_name, message, patch, author)
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py", line 103, in create_branch_with_patch
    self.run(['git', 'commit', '--author', author_str, '-am', message])
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py", line 44, in run
    return self.host.executive.run_command(command, cwd=self.path, **kwargs)
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 339, in run_command
    (error_handler or self.default_error_handler)(script_error)
  File "/b/rr/tmpLCOXZv/w/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 247, in default_error_handler
    raise error
webkitpy.common.system.executive.ScriptError: Failed to run "['git', 'commit', '--author', u'"meade <meade@chromium.org>"\n', '-am', u"Delete obsolete number and length classes from Typed OM\n\nThis breaks most of our layout tests, since most things\ndepend on numbers and lengths, but it's better to be in\na single half state than have two half states hanging\naround.\n\nBUG=545318\n\nReview-Url: https://codereview.chromium.org/2867883003\nCr-Commit-Position: refs/heads/master@{#474925}\n\n"]" exit_code: 128 cwd: /tmp/wpt
output: 
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident name (for <(null)>) not allowed
step returned non-zero exit code: 1
Running the exporter locally helps it get unstuck (since this error only happens during PR creation). I'm guessing it's since my local git hasn't been upgraded yet.
Re #6:

I also saw git errors related to no author being set in webkitpy unit tests ( bug 722975 ), similar to the recent situation with the upgrade to git 2.13... but based on the cit-hangout chat from yesterday this is probably not the git 2.13 issue again?
Project Member

Comment 9 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/e422b2f718bed3136de093e3f124ad6b5fd93768

commit e422b2f718bed3136de093e3f124ad6b5fd93768
Author: Jeff Carpenter <jeffcarp@chromium.org>
Date: Tue May 30 20:08:57 2017

[WPT Export] Set --global for git config

Since we're making commits in /tmp/wpt but git config is only called
in the Chromium directory, this results in git being unable to find
user.name and user.email when the exporter is creating a local commit.

Bug:  725959 
Change-Id: Icf64375c6e1dbe39f744e5f8b87aa48aff6d6876
Reviewed-on: https://chromium-review.googlesource.com/518026
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Jeff Carpenter <jeffcarp@chromium.org>

[modify] https://crrev.com/e422b2f718bed3136de093e3f124ad6b5fd93768/recipes/recipes/wpt_export.py
[modify] https://crrev.com/e422b2f718bed3136de093e3f124ad6b5fd93768/recipes/recipes/wpt_export.expected/wpt-export.json

Cc: -cha...@chromium.org
Status: Fixed (was: Assigned)
The latest CL (above) fixed this issue. Thanks to qyearsley for pointing out the cause.
Components: Blink>Infra>Ecosystem
Components: -Blink>Infra>Predictability

Sign in to add a comment