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

Issue 21261006: Put cleanup steps in finally block so cleanup happens after halt on failure. (Closed)

Created:
7 years, 4 months ago by navabi
Modified:
7 years, 2 months ago
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Put cleanup steps in finally block so cleanup happens after halt on failure. The device_status_check hangs because there are still processes launched by the buildbot script that are not cleaned up. E.g. https://chromegw.corp.google.com/i/clank/builders/manta-sharded-official-perf-clankium/builds/2359 This makes sure the post commands are executed after halt on failure. BUG=265578 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215365

Patch Set 1 #

Patch Set 2 : Use try/finally block instead of cleanup thunk. #

Patch Set 3 : Use finally block. #

Total comments: 3

Patch Set 4 : Removed GetPostTestStepCmds(), call functions directly. #

Patch Set 5 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -23 lines) Patch
M build/android/buildbot/bb_device_steps.py View 1 2 3 4 2 chunks +20 lines, -23 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
navabi
7 years, 4 months ago (2013-07-30 23:38:03 UTC) #1
Isaac (away)
I think easier would be to set a process group in bb_run_bot and then kill ...
7 years, 4 months ago (2013-07-30 23:40:52 UTC) #2
navabi
On 2013/07/30 23:40:52, Isaac wrote: > I think easier would be to set a process ...
7 years, 4 months ago (2013-07-31 00:08:46 UTC) #3
navabi
7 years, 4 months ago (2013-07-31 00:32:46 UTC) #4
Isaac (away)
On 2013/07/31 00:08:46, navabi wrote: > On 2013/07/30 23:40:52, Isaac wrote: > > I think ...
7 years, 4 months ago (2013-07-31 00:41:11 UTC) #5
navabi
On 2013/07/31 00:41:11, Isaac wrote: > On 2013/07/31 00:08:46, navabi wrote: > > On 2013/07/30 ...
7 years, 4 months ago (2013-07-31 01:23:11 UTC) #6
Isaac (away)
Why would killing the process group when the build ends affect the log dump step? ...
7 years, 4 months ago (2013-07-31 01:26:44 UTC) #7
navabi
PTAL. https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py File build/android/buildbot/bb_device_steps.py (left): https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py#oldcode396 build/android/buildbot/bb_device_steps.py:396: This moved to GetPostTestStepCmds.
7 years, 4 months ago (2013-08-02 00:29:32 UTC) #8
Isaac (away)
lgtm w/ nit https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py File build/android/buildbot/bb_device_steps.py (right): https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py#newcode356 build/android/buildbot/bb_device_steps.py:356: finally: Could we just call the ...
7 years, 4 months ago (2013-08-02 02:20:25 UTC) #9
navabi
https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py File build/android/buildbot/bb_device_steps.py (right): https://codereview.chromium.org/21261006/diff/12001/build/android/buildbot/bb_device_steps.py#newcode356 build/android/buildbot/bb_device_steps.py:356: finally: On 2013/08/02 02:20:26, Isaac wrote: > Could we ...
7 years, 4 months ago (2013-08-02 16:26:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/navabi@google.com/21261006/18001
7 years, 4 months ago (2013-08-02 17:33:48 UTC) #11
commit-bot: I haz the power
Failed to apply patch for build/android/buildbot/bb_device_steps.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 4 months ago (2013-08-02 17:33:49 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/navabi@google.com/21261006/22001
7 years, 4 months ago (2013-08-02 18:01:12 UTC) #13
commit-bot: I haz the power
Change committed as 215365
7 years, 4 months ago (2013-08-02 21:08:09 UTC) #14
qinmin
On 2013/08/02 21:08:09, I haz the power (commit-bot) wrote: > Change committed as 215365 I ...
7 years, 4 months ago (2013-08-03 02:40:25 UTC) #15
navabi
7 years, 4 months ago (2013-08-05 19:23:53 UTC) #16
Message was sent while issue was closed.
On 2013/08/03 02:40:25, qinmin wrote:
> On 2013/08/02 21:08:09, I haz the power (commit-bot) wrote:
> > Change committed as 215365
> 
> I suspect this change makes all android bots hanging with the following
> messages:
> 
> < build/android/test_runner.py instrumentation --test-apk ChromeTest
--test_data
> clank:clank/test/data/android/device_files --verbose
> --flakiness-dashboard-server=clank-test-results.appspot.com
>
--python_test_root=/b/build/slave/instrumentation-yakju-clankium/build/src/clank/java/apps/tests/src
> -A LargeTest --screenshot
> Traceback (most recent call last):
>   File
>
"/b/build/slave/instrumentation-yakju-clankium/build/src/clank/build/buildbot/bb_device_steps_internal.py",
> line 292, in <module>
>     sys.exit(main(sys.argv))
>   File
>
"/b/build/slave/instrumentation-yakju-clankium/build/src/clank/build/buildbot/bb_device_steps_internal.py",
> line 283, in main
>     bb_device_steps.GetPostTestStepCmds() +
> AttributeError: 'module' object has no attribute 'GetPostTestStepCmds'
> # 08/02/13 19:10:16: Waiting for device package manager...
> # 08/02/13 19:10:16: Waiting for device package manager...
> # 08/02/13 19:10:16: Waiting for device package manager...
> # 08/02/13 19:10:36: No response for adb -s 014E04E119016009 wait-for-device,
> retrying
> # 08/02/13 19:10:16: Waiting for device package manager...
> # 08/02/13 19:10:36: No response for adb -s 0149CD260E017014 wait-for-device,
> retrying

I believe Isaac fixed this.

Powered by Google App Engine
This is Rietveld 408576698