WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73482
[Chromium] sheriffbot roll-chromium-deps shouldn't create a bug with None as the new revision.
https://bugs.webkit.org/show_bug.cgi?id=73482
Summary
[Chromium] sheriffbot roll-chromium-deps shouldn't create a bug with None as ...
David Levin
Reported
2011-11-30 12:58:35 PST
Like this one:
https://bugs.webkit.org/show_bug.cgi?id=73481
Attachments
Patch
(3.58 KB, patch)
2013-01-07 14:02 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(2.54 KB, patch)
2013-01-07 21:52 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(2.54 KB, patch)
2013-01-07 22:25 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(2.54 KB, patch)
2013-01-07 22:36 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(2.45 KB, patch)
2013-01-07 22:41 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(13.33 KB, patch)
2013-01-30 02:36 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Patch
(14.55 KB, patch)
2013-01-30 02:47 PST
,
Alan Cutter
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2011-11-30 13:04:41 PST
Assigned for tracking.
Ami Fischman
Comment 2
2012-04-06 14:06:09 PDT
Another "None" patch created by sheriffbot:
https://bugs.webkit.org/attachment.cgi?id=136060&action=edit
Ami Fischman
Comment 3
2012-05-29 21:41:03 PDT
***
Bug 84443
has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 4
2012-06-06 10:59:24 PDT
webkit-patch roll-chromium-deps works fine. Not sure if sheriffbot is failing to fetch the URL or something else is happening there :\
Alan Cutter
Comment 5
2013-01-06 19:41:04 PST
Sheriffbot passes None to UpdateChromiumDEPS via UNIX pipes causing None to be converted to "None". Ideally argument validation should occur in UpdateChromiumDEPS rather than Sheriffbot.
Alan Cutter
Comment 6
2013-01-07 14:02:06 PST
Created
attachment 181559
[details]
Patch
Ryosuke Niwa
Comment 7
2013-01-07 14:06:52 PST
Comment on
attachment 181559
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181559&action=review
> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:76 > new_chromium_revision = state["chromium_revision"]
Why don’t we just convert it to int here inside try & except instead of checking the validity here and then converting it into int in _validate_revisions?
Adam Barth
Comment 8
2013-01-07 16:33:30 PST
Comment on
attachment 181559
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181559&action=review
>> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:76 >> new_chromium_revision = state["chromium_revision"] > > Why don’t we just convert it to int here inside try & except instead of checking the validity here and then converting it into int in _validate_revisions?
Yeah, other places we use the ValueException (or something like that) to handle these cases.
Alan Cutter
Comment 9
2013-01-07 21:52:17 PST
Created
attachment 181637
[details]
Patch
Ryosuke Niwa
Comment 10
2013-01-07 22:00:41 PST
Comment on
attachment 181637
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181637&action=review
> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:54 > + except Exception, e: > + return None
Just except ValueException since we shouldn’t be getting other kinds of exceptions.
Alan Cutter
Comment 11
2013-01-07 22:25:48 PST
Created
attachment 181642
[details]
Patch
Alan Cutter
Comment 12
2013-01-07 22:27:10 PST
(In reply to
comment #10
)
> (From update of
attachment 181637
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=181637&action=review
> > > Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:54 > > + except Exception, e: > > + return None > > Just except ValueException since we shouldn’t be getting other kinds of exceptions.
Ah thanks for picking that up, that was sloppy of me. Fixed in repatch.
Ryosuke Niwa
Comment 13
2013-01-07 22:29:00 PST
Comment on
attachment 181642
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181642&action=review
> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:79 > + if new_chromium_revision == None:
It’s probably sufficient to check "not new_chromium_revision" since revision 0 doesn’t exist nor is useful.
Alan Cutter
Comment 14
2013-01-07 22:36:04 PST
(In reply to
comment #13
)
> (From update of
attachment 181642
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=181642&action=review
> > > Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:79 > > + if new_chromium_revision == None: > > It’s probably sufficient to check "not new_chromium_revision" since revision 0 doesn’t exist nor is useful.
Agreed in hindsight. Changed in repatch.
Alan Cutter
Comment 15
2013-01-07 22:36:18 PST
Created
attachment 181645
[details]
Patch
Ryosuke Niwa
Comment 16
2013-01-07 22:37:24 PST
Comment on
attachment 181645
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181645&action=review
> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:79 > + if new_chromium_revision:
Now you’re missing "not"!
Alan Cutter
Comment 17
2013-01-07 22:40:57 PST
(In reply to
comment #16
)
> (From update of
attachment 181645
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=181645&action=review
> > > Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:79 > > + if new_chromium_revision: > > Now you’re missing "not"!
Ouch! Been a long day...
Alan Cutter
Comment 18
2013-01-07 22:41:41 PST
Created
attachment 181646
[details]
Patch
Eric Seidel (no email)
Comment 19
2013-01-07 22:45:47 PST
Comment on
attachment 181646
[details]
Patch Should we be logging to the user when their revision fails to parse and we end up using the LKGR instead?
Alan Cutter
Comment 20
2013-01-07 23:00:39 PST
(In reply to
comment #19
)
> (From update of
attachment 181646
[details]
) > Should we be logging to the user when their revision fails to parse and we end up using the LKGR instead?
I was wondering that and figured it would be more appropriate to address in a separate bug. Alternatively it should fail completely if an invalid input is given and have a special input for using the LKGR (eg. "LKGR").
Eric Seidel (no email)
Comment 21
2013-01-24 01:27:14 PST
Comment on
attachment 181646
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181646&action=review
Otherwise this is good to go.
> Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py:48 > + @staticmethod > + def _parse_revision_name(revision):
Please write a test for this.
Alan Cutter
Comment 22
2013-01-30 02:36:45 PST
Created
attachment 185444
[details]
Patch
Alan Cutter
Comment 23
2013-01-30 02:47:34 PST
Created
attachment 185447
[details]
Patch
Alan Cutter
Comment 24
2013-01-30 02:52:59 PST
(In reply to
comment #23
)
> Created an attachment (id=185447) [details] > Patch
Changed the RollChromiumDEPS command to reject invalid revision numbers and use "LKGR" explicitly to use the last known good revision. Added error handling in the UpdateChromiumDEPS step and logic in the Sheriffbot to handle those errors.
Eric Seidel (no email)
Comment 25
2013-01-30 11:16:21 PST
Shouldn't it just fail if "None" is the LKGR? Explicit is OK, but seems unrelated.
Alan Cutter
Comment 26
2013-01-30 15:33:10 PST
(In reply to
comment #25
)
> Shouldn't it just fail if "None" is the LKGR? Explicit is OK, but seems unrelated.
I don't think the LKGR being None was the cause of the issue, rather Sheriffbot was passing None to the webkit-patch post-chromium-deps-roll command via a pipe when no valid revision was given by the user. The None was converted to the string "None" and no longer evaluates as Boolean False when UpdateChromiumDEPS checks it. UpdateChromiumDEPS then uses "None" instead of fetching the LKGR. The problem was UpdateChromiumDEPS wasn't validating its input properly. Should we keep the behaviour of using LKGR if no revision is specified but fail on any other invalid input (like "None")?
WebKit Review Bot
Comment 27
2013-03-06 09:55:36 PST
Comment on
attachment 185447
[details]
Patch Clearing flags on attachment: 185447 Committed
r144940
: <
http://trac.webkit.org/changeset/144940
>
WebKit Review Bot
Comment 28
2013-03-06 09:55:41 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug