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

Issue 4442001: Add more error checking to preflight queue. (Closed)

Created:
10 years, 1 month ago by davidjames
Modified:
10 years, 1 month ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Add more error checking to preflight queue. What's new? - cros_mark_as_stable now exits with errors if directories are specified that don't exist. - cbuildbot.py always explicitly specifies overlay directories so cros_mark_as_stable can rely on them existing. - Package names and paths are now separated with colons instead of spaces, so as to allow for us using the same syntax with enter_chroot.sh as we use without the same script. (enter_chroot.sh mucks with command-lines that contain spaces or quotes.) - cbuildbot.py now ensures its build path is a absolute path. This ensures we don't kill the wrong processes, if, for instance, the buildpath is '../..' - All buildbots now explicitly specify what overlays they want to rev. Public buildbots only rev public ebuilds and private buildbots now only rev private ebuilds. BUG=chromium-os:8647 TEST=Ran unit tests. Manually marked packages as stable. Ran cbuildbot.py test run. Change-Id: I1df6d428973d91329c4f5159e2886889a3ebb7c7 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=795bd30 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=b49c6df

Patch Set 1 #

Patch Set 2 : Typo fix #

Total comments: 11

Patch Set 3 : Rebase #

Patch Set 4 : Address nits. #

Patch Set 5 : Quotes #

Total comments: 11

Patch Set 6 : Nits #

Patch Set 7 : Fix missing buildroot variable #

Patch Set 8 : Update cros_mark_as_stable.py to run outside chroot #

Total comments: 2

Patch Set 9 : Update unit tests #

Total comments: 23

Patch Set 10 : gpylint #

Patch Set 11 : Add comments #

Patch Set 12 : Address comments. #

Total comments: 6

Patch Set 13 : Nits #

Patch Set 14 : s/os.path.exists/os.path.isdir/g #

Total comments: 13

Patch Set 15 : Fix more nits. #

Patch Set 16 : Fix bug in FindRepoDir #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -83 lines) Patch
M bin/cbuildbot.py View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +60 lines, -33 lines 0 comments Download
M bin/cbuildbot_config.py View 1 2 3 4 chunks +9 lines, -30 lines 0 comments Download
M bin/cbuildbot_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +13 lines, -4 lines 0 comments Download
M cros_mark_as_stable.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +22 lines, -9 lines 0 comments Download
M lib/cros_build_lib.py View 2 chunks +12 lines, -7 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
davidjames
10 years, 1 month ago (2010-11-03 23:25:31 UTC) #1
sosa
Can you fix the bug number ... also address my nits before committing. LGTM http://codereview.chromium.org/4442001/diff/3001/4001 ...
10 years, 1 month ago (2010-11-03 23:49:06 UTC) #2
diandersAtChromium
LGTM aside from nits. Note that I'm not familiar w/ code, so please don't commit ...
10 years, 1 month ago (2010-11-03 23:53:34 UTC) #3
diandersAtChromium
Bug number should be 8642. ...also, I think scottz was originally thinking of doing something ...
10 years, 1 month ago (2010-11-03 23:57:56 UTC) #4
diandersAtChromium
Darnit: I mean 8647
10 years, 1 month ago (2010-11-03 23:58:24 UTC) #5
davidjames
PTAL http://codereview.chromium.org/4442001/diff/3001/bin/cbuildbot.py File bin/cbuildbot.py (right): http://codereview.chromium.org/4442001/diff/3001/bin/cbuildbot.py#newcode461 bin/cbuildbot.py:461: """Return the list of overlays to use for ...
10 years, 1 month ago (2010-11-10 18:30:10 UTC) #6
scottz-goog
While these checks are definitely worth putting in dianders is right, the core of the ...
10 years, 1 month ago (2010-11-10 23:48:13 UTC) #7
davidjames
> While these checks are definitely worth putting in dianders is right, the core > ...
10 years, 1 month ago (2010-11-11 02:23:24 UTC) #8
davidjames
PTAL
10 years, 1 month ago (2010-11-11 23:13:07 UTC) #9
sosa
LGTM w/ nits Ideally we could add some check now in cros_mark_as_stable that it should ...
10 years, 1 month ago (2010-11-12 19:18:45 UTC) #10
diandersAtChromium
I'm not really familiar with all of these tools/options, so I just did an hour's ...
10 years, 1 month ago (2010-11-12 19:25:30 UTC) #11
sosa
Actually, dianders brought up some really good points. Can you please address them
10 years, 1 month ago (2010-11-12 19:28:10 UTC) #12
sosa
Dianders prompted me to look a little more carefully. I've addressed some of his comments ...
10 years, 1 month ago (2010-11-12 19:38:09 UTC) #13
davidjames
http://codereview.chromium.org/4442001/diff/39001/bin/cbuildbot.py File bin/cbuildbot.py (right): http://codereview.chromium.org/4442001/diff/39001/bin/cbuildbot.py#newcode462 bin/cbuildbot.py:462: def ResolveOverlays(buildroot, overlays): On 2010/11/12 19:25:30, diandersAtChromium wrote: > ...
10 years, 1 month ago (2010-11-12 21:18:05 UTC) #14
sosa
LGTM w/ nits, but ask Dianders if he wants to take another crack. http://codereview.chromium.org/4442001/diff/61001/bin/cbuildbot_unittest.py File ...
10 years, 1 month ago (2010-11-12 21:28:40 UTC) #15
davidjames
http://codereview.chromium.org/4442001/diff/61001/bin/cbuildbot_unittest.py File bin/cbuildbot_unittest.py (right): http://codereview.chromium.org/4442001/diff/61001/bin/cbuildbot_unittest.py#newcode170 bin/cbuildbot_unittest.py:170: overlays = [ '%s/src/third_party/chromiumos-overlay' % self._buildroot ] On 2010/11/12 ...
10 years, 1 month ago (2010-11-12 21:37:50 UTC) #16
diandersAtChromium
Mostly more nits, though I'm still confused about the "-9999" thing. http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py File bin/cbuildbot_unittest.py (right): ...
10 years, 1 month ago (2010-11-12 22:09:35 UTC) #17
davidjames
10 years, 1 month ago (2010-11-12 22:31:25 UTC) #18
Thanks for the review. Pushing. I'll send you some followup commits to address
the things I didn't get here.

http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py
File bin/cbuildbot_unittest.py (right):

http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py#n...
bin/cbuildbot_unittest.py:46: self._overlays = [
'%s/src/third_party/chromiumos-overlay' % self._buildroot ]
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> NIT: line too long

Done.

http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py#n...
bin/cbuildbot_unittest.py:47: self._chroot_overlays = [
ReinterpretPathForChroot(self._overlays[0]) ]
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> NIT: [ ReinterpretPathForChroot(p) for p in self._overlays ]
> 
> ...then if someone adds an overlay, they don't end up with a bug.

Done.

http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py#n...
bin/cbuildbot_unittest.py:181: self._revision_file, self._test_board,
self._overlays)
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> NIT: > 80 characters

Done.

http://codereview.chromium.org/4442001/diff/67001/bin/cbuildbot_unittest.py#n...
bin/cbuildbot_unittest.py:203: self._revision_file, self._test_board,
self._overlays)
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> NIT: > 80 characters

Done.

http://codereview.chromium.org/4442001/diff/67001/cros_mark_as_stable.py
File cros_mark_as_stable.py (right):

http://codereview.chromium.org/4442001/diff/67001/cros_mark_as_stable.py#newc...
cros_mark_as_stable.py:387: # Has no revision so we stripped the version number
instead.
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> I'm still confused how this would handle something like
> './sys-apps/parted/parted-1.9.0.ebuild'.  ...or does that never come up?  The
> old code _did_ handle that case.

This looks like a real bug to me. But it's not new in my commit and we haven't
run into it yet.

Here's a reproduction case:
  1. Commit workon parted-0.0.1.ebuild and parted-9999.ebuild as workon ebuilds.
  2. cros_mark_as_stable creates parted-0.0.1.ebuild0.0.1-r1.ebuild (oops!)

I'm going to file a bug for this and fix it in a separate commit (because my
commit is already getting large and it's unrelated).

http://codereview.chromium.org/4442001/diff/67001/cros_mark_as_stable.py#newc...
cros_mark_as_stable.py:520: os.chdir(overlay)
On 2010/11/12 22:09:35, diandersAtChromium wrote:
> Technically, it would probably still be a good idea to chdir back to the
> original directory after the loop has finished.  If not, this function has an
> undocumented side effect of leaving the cwd in an unpredictable location,
which
> is a terrible idea.
> 
> To be completely correct, the chdir back to the original dir should be in a
> "finally" clause so that thrown exceptions don't leave the cwd in the wrong
> state.

Agreed. Since this is unrelated, I'm going to correct this in a followup commit.

Powered by Google App Engine
This is Rietveld 408576698