Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1196)

Issue 157073002: Bot update! (Closed)

Created:
6 years, 10 months ago by Ryan Tseng
Modified:
6 years, 10 months ago
Reviewers:
iannucci, agable, pgervais
CC:
chromium-reviews, stip+watch_chromium.org, cmp-cc_chromium.org, ilevy-cc_chromium.org, kjellander+cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/build.git@master
Visibility:
Public.

Description

This implements all of bot_update.py except for applying patches. This patch is dependent on https://codereview.chromium.org/150653004/ for proper deps2git.py invocation. The chromium_commands.py bits are for disabling the update step when it sees a flag file emitted by bot_update.py The flow essentially is: 1. Delete flag, if its there 2. Check if we're on a master/builder/slave that should be running this. 3. Parse and convert gclient specs to git 4. Delete build directory if .svn is present in one of the solutions 5. Fetch a git checkout using clone/reset/clean/pull/clean 6. Run deps2git 7. Gclient sync 8. Emit flag 9. ??? 10. Profit BUG=339168 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=250236

Patch Set 1 #

Patch Set 2 : Removed unneeded deferreds #

Patch Set 3 : Minor fixes #

Patch Set 4 : moved gclient message around #

Patch Set 5 : We dont' actually want to run on chromium.linux yet #

Total comments: 24

Patch Set 6 : Review fixews #

Patch Set 7 : Chromium_commands pruning #

Patch Set 8 : Change cache dir #

Patch Set 9 : Fix PS8 #

Patch Set 10 : Chromium commands fix #

Total comments: 11

Patch Set 11 : nit fix #

Patch Set 12 : Add cache_dir to wanted directory #

Patch Set 13 : Fixed cache dir from the build/.. dir to build/../.. dir #

Patch Set 14 : Wait we got the directory right the first time #

Patch Set 15 : Rebase #

Patch Set 16 : pylint #

Patch Set 17 : No need to print message in chromium_util #

Total comments: 29

Patch Set 18 : Review fix #

Total comments: 8

Patch Set 19 : Review fix #

Total comments: 1

Patch Set 20 : Remove environ #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -59 lines) Patch
M scripts/master/factory/commands.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -3 lines 0 comments Download
M scripts/slave/bot_update.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +210 lines, -54 lines 12 comments Download
M scripts/slave/chromium_commands.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +15 lines, -1 line 0 comments Download
M scripts/slave/gclient_safe_revert.py View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M slave/run_slave.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 30 (0 generated)
Ryan Tseng
Hi Aaron and Robbie, can you guys review this? It has passed (compile) on my ...
6 years, 10 months ago (2014-02-07 00:53:43 UTC) #1
agable
https://codereview.chromium.org/157073002/diff/130001/scripts/common/chromium_utils.py File scripts/common/chromium_utils.py (right): https://codereview.chromium.org/157073002/diff/130001/scripts/common/chromium_utils.py#newcode412 scripts/common/chromium_utils.py:412: print 'a git checkout already. Skipping this step.' Not ...
6 years, 10 months ago (2014-02-07 04:47:40 UTC) #2
Ryan Tseng
Fixes made, currently running here: http://oddish.mtv.corp.google.com:8019/builders/LinuxGit%20x64/ ptal. https://codereview.chromium.org/157073002/diff/130001/scripts/common/chromium_utils.py File scripts/common/chromium_utils.py (right): https://codereview.chromium.org/157073002/diff/130001/scripts/common/chromium_utils.py#newcode412 scripts/common/chromium_utils.py:412: print 'a ...
6 years, 10 months ago (2014-02-07 21:23:06 UTC) #3
Ryan Tseng
That link seems broken, try this one: http://oddish.mtv.corp.google.com:8019/builders/LinuxGit%20x64 On Fri, Feb 7, 2014 at 1:23 ...
6 years, 10 months ago (2014-02-07 21:23:50 UTC) #4
agable
LGTM modulo some nits/questions. https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py#newcode89 scripts/slave/bot_update.py:89: CACHE_DIR = os.path.join( could do ...
6 years, 10 months ago (2014-02-07 22:19:05 UTC) #5
iannucci
https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py#newcode89 scripts/slave/bot_update.py:89: CACHE_DIR = os.path.join( On 2014/02/07 22:19:06, agable wrote: > ...
6 years, 10 months ago (2014-02-07 22:24:09 UTC) #6
Ryan Tseng
https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/290001/scripts/slave/bot_update.py#newcode89 scripts/slave/bot_update.py:89: CACHE_DIR = os.path.join( On 2014/02/07 22:19:06, agable wrote: > ...
6 years, 10 months ago (2014-02-07 22:27:49 UTC) #7
Ryan Tseng
Will commit once http://oddish.mtv.corp.google.com:8019/builders/LinuxGit%20x64/builds/3 goes green
6 years, 10 months ago (2014-02-07 22:39:48 UTC) #8
Ryan Tseng
Made 2 more changes: 1. PS11 has SLAVE_DIR and subsequently cache_dir in the wrong place, ...
6 years, 10 months ago (2014-02-07 23:31:17 UTC) #9
Ryan Tseng
I'm going crazy and losing track of where directories are. I think its right this ...
6 years, 10 months ago (2014-02-08 00:02:36 UTC) #10
Ryan Tseng
The CQ bit was checked by hinoka@google.com
6 years, 10 months ago (2014-02-08 00:24:49 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@google.com/157073002/520001
6 years, 10 months ago (2014-02-08 00:24:51 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-08 00:24:53 UTC) #13
commit-bot: I haz the power
Failed to apply patch for build/scripts/slave/chromium_commands.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-08 00:24:53 UTC) #14
Ryan Tseng
The CQ bit was checked by hinoka@google.com
6 years, 10 months ago (2014-02-08 00:37:21 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@google.com/157073002/600001
6 years, 10 months ago (2014-02-08 00:37:31 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-08 00:38:15 UTC) #17
commit-bot: I haz the power
Presubmit check for 157073002-600001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 10 months ago (2014-02-08 00:38:16 UTC) #18
iannucci
stuffs https://chromiumcodereview.appspot.com/157073002/diff/730001/scripts/master/factory/commands.py File scripts/master/factory/commands.py (right): https://chromiumcodereview.appspot.com/157073002/diff/730001/scripts/master/factory/commands.py#newcode938 scripts/master/factory/commands.py:938: 'root': '%(root:~src)s', I'm not sure if the default ...
6 years, 10 months ago (2014-02-08 01:31:30 UTC) #19
Ryan Tseng
https://chromiumcodereview.appspot.com/157073002/diff/730001/scripts/master/factory/commands.py File scripts/master/factory/commands.py (right): https://chromiumcodereview.appspot.com/157073002/diff/730001/scripts/master/factory/commands.py#newcode938 scripts/master/factory/commands.py:938: 'root': '%(root:~src)s', On 2014/02/08 01:31:31, iannucci wrote: > I'm ...
6 years, 10 months ago (2014-02-08 01:52:21 UTC) #20
iannucci
https://codereview.chromium.org/157073002/diff/730001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/730001/scripts/slave/bot_update.py#newcode110 scripts/slave/bot_update.py:110: buf = proc.stdout.read(1) On 2014/02/08 01:52:21, Ryan T. wrote: ...
6 years, 10 months ago (2014-02-08 03:37:20 UTC) #21
Ryan Tseng
Added fixes, passed green locally https://codereview.chromium.org/157073002/diff/730001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/730001/scripts/slave/bot_update.py#newcode110 scripts/slave/bot_update.py:110: buf = proc.stdout.read(1) On ...
6 years, 10 months ago (2014-02-10 23:11:27 UTC) #22
iannucci
lgtm % env var https://codereview.chromium.org/157073002/diff/850001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/850001/scripts/slave/bot_update.py#newcode349 scripts/slave/bot_update.py:349: options.revision = os.environ.get('BUILDBOT_REVISION') nope?
6 years, 10 months ago (2014-02-10 23:30:28 UTC) #23
Ryan Tseng
The CQ bit was checked by hinoka@google.com
6 years, 10 months ago (2014-02-10 23:55:18 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@google.com/157073002/920001
6 years, 10 months ago (2014-02-10 23:55:24 UTC) #25
commit-bot: I haz the power
Change committed as 250236
6 years, 10 months ago (2014-02-10 23:56:38 UTC) #26
pgervais
Passing by, added some comments. https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py#newcode100 scripts/slave/bot_update.py:100: for attempt in xrange(RETRIES): ...
6 years, 10 months ago (2014-02-12 17:46:24 UTC) #27
Ryan Tseng
https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py#newcode100 scripts/slave/bot_update.py:100: for attempt in xrange(RETRIES): On 2014/02/12 17:46:26, pgervais wrote: ...
6 years, 10 months ago (2014-02-12 18:56:52 UTC) #28
pgervais
https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py File scripts/slave/bot_update.py (right): https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_update.py#newcode100 scripts/slave/bot_update.py:100: for attempt in xrange(RETRIES): On 2014/02/12 18:56:53, Ryan T. ...
6 years, 10 months ago (2014-02-12 19:17:22 UTC) #29
agable
6 years, 10 months ago (2014-02-12 19:59:10 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_updat...
File scripts/slave/bot_update.py (right):

https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_updat...
scripts/slave/bot_update.py:100: for attempt in xrange(RETRIES):
FWIW, the construct being used here (pass all **kwargs straight through to
subprocess.Popen) is the same system used throughout recipes. We're definitely
not ever going to list all the arguments to Popen (there are 13 of them).

We do use kwargs.pop() in a bunch of places, so we could/should probably use
that here too. I don't feel strongly either way.

As for call(1, 2, 3) vs call([1, 2, 3])... recipes uses both. I think we ended
up standardizing on the latter (since it was effectively necessary for
api.python) but again i don't feel strongly either way.

https://codereview.chromium.org/157073002/diff/920001/scripts/slave/bot_updat...
scripts/slave/bot_update.py:116: print '===Succeeded in %.1f mins===' %
elapsed_time
On 2014/02/12 19:17:22, pgervais wrote:
> On 2014/02/12 18:56:53, Ryan T. wrote:
> > On 2014/02/12 17:46:26, pgervais wrote:
> > > nit: units have no plural. Use 'min' instead of 'mins'
> > 
> > I intentionally said "mins" because everything except 1.0min should be
plural
> > (0.0 mins, 0.5 mins, 2.0mins), so it would be right most of the time.
> 
> My point was that you should write '2 min' not '2 mins', because 'min' is a
> unit, not an abbreviation. It's the same with other units: 2 m, 2 mph.

+1. Any of 'min' or 'minutes' or 'minute(s)' are correct, 'mins' isn't really.

Powered by Google App Engine
This is Rietveld 408576698