New issue
Advanced search Search tips

Issue 709216 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

third_party/WebKit/PRESUBMIT.py fails on empty diffs

Project Member Reported by wychen@chromium.org, Apr 6 2017

Issue description

What steps will reproduce the problem?
(1) Create branch A, add a few lines to a file and commit.
(2) git cl upload
(3) Create branch B, using A as upstream. Revert what's added in branch A.
(4) git cl upload

What is the expected result?
It should pass.

What happens instead?
** Presubmit ERRORS **
check-webkit-style failed
  Total errors found: 0 in 0 files

I think we should add command line option '--git-commit=UPSTREAM....' to script third_party/WebKit/Tools/Scripts/check-webkit-style if git upstream branch is set.
 
That sounds like a good solution to me :-) Have you checked to see whether it behaves correctly if you change the invocation of check-webkit-style in PRESUBMIT.py in that example case?

Another possible option might be to make it so that check-webkit-style itself is responsible for invoking git to see what the upstream branch is?
Yes. If I modify third_party/WebKit/PRESUBMIT.py to add --git-commit=UPSTREAM.... to it, it works.

When we have stacked CLs, do we always only check the last part (from upstream to HEAD), or we check from master to HEAD? Looks like PRESUBMIT mixed both.
Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)

Comment 4 by dcheng@chromium.org, Aug 18 2017

I'm hitting this issue without stacked local branches (and I know a number of other people have been encountering this periodically).

The root cause for me is the diff is empty, so the condition here: https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/style/main.py?rcl=1337e8acbbbdae695def65acbd7b2209d35aa3fa&l=162

We should figure out how to fix this.

Comment 5 by dcheng@chromium.org, Aug 18 2017

https://chromium-review.googlesource.com/620447 was failing locally for me.

(Not sure if it will be reproducible with git cl patch --force)
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 20

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Summary: third_party/WebKit/PRESUBMIT.py fails on empty diffs (was: third_party/WebKit/PRESUBMIT.py fails on stacked branches)
The "or there are no checked files" part of the condition goes back to at least https://chromium.googlesource.com/chromium/src/+/e64845ed267478a2c17055caafda9dc3c68043e9 (2011) and folks who are no longer on the project, so trying to understand the history being it probably won't be helpful.

Seems like what should be done here is to just simplify the condition. Marking as available again, and it does seem like a good first bug in this area.

Sign in to add a comment