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

Side by Side Diff: slave/skia_slave_scripts/build_step.py

Issue 405653004: add ACL-setting code to upload_rendered_skps.py (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: add comment Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base class for all slave-side build steps. """ 5 """Base class for all slave-side build steps. """
6 6
7 import config 7 import config
8 # pylint: disable=W0611 8 # pylint: disable=W0611
9 import flavor_utils 9 import flavor_utils
10 import imp 10 import imp
(...skipping 15 matching lines...) Expand all
26 # Add important directories to the PYTHONPATH 26 # Add important directories to the PYTHONPATH
27 sys.path.append(os.path.join(BUILDBOT_PATH)) 27 sys.path.append(os.path.join(BUILDBOT_PATH))
28 sys.path.append(os.path.join(BUILDBOT_PATH, 'site_config')) 28 sys.path.append(os.path.join(BUILDBOT_PATH, 'site_config'))
29 sys.path.append(os.path.join(BUILDBOT_PATH, 'master')) 29 sys.path.append(os.path.join(BUILDBOT_PATH, 'master'))
30 sys.path.insert(0, os.path.join(BUILDBOT_PATH, 'common')) 30 sys.path.insert(0, os.path.join(BUILDBOT_PATH, 'common'))
31 31
32 import builder_name_schema 32 import builder_name_schema
33 import slave_hosts_cfg 33 import slave_hosts_cfg
34 import slaves_cfg 34 import slaves_cfg
35 35
36 from py.utils import gs_utils
36 from py.utils import misc 37 from py.utils import misc
37 38
38 39
39 DEFAULT_TIMEOUT = 4800 40 DEFAULT_TIMEOUT = 4800
40 DEFAULT_NO_OUTPUT_TIMEOUT = 3600 41 DEFAULT_NO_OUTPUT_TIMEOUT = 3600
41 DEFAULT_NUM_CORES = 2 42 DEFAULT_NUM_CORES = 2
42 43
43 44
44 GM_EXPECTATIONS_FILENAME = 'expected-results.json' 45 GM_EXPECTATIONS_FILENAME = 'expected-results.json'
45 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt' 46 GM_IGNORE_FAILURES_FILE = 'ignored-tests.txt'
46 47
47 48
48 # multiprocessing.Value doesn't accept boolean types, so we have to use an int. 49 # multiprocessing.Value doesn't accept boolean types, so we have to use an int.
49 INT_TRUE = 1 50 INT_TRUE = 1
50 INT_FALSE = 0 51 INT_FALSE = 0
51 build_step_stdout_has_written = multiprocessing.Value('i', INT_FALSE) 52 build_step_stdout_has_written = multiprocessing.Value('i', INT_FALSE)
52 53
53 54
54 # The canned acl to use while copying playback files to Google Storage. 55 # The canned acl to use while copying playback (SKP) files to Google Storage.
55 PLAYBACK_CANNED_ACL = 'private' 56 # They should not be world-readable!
57 PLAYBACK_CANNED_ACL = gs_utils.PREDEFINED_ACL_PRIVATE
58 PLAYBACK_FINEGRAINED_ACL_LIST = [
59 (gs_utils.ID_TYPE_GROUP_BY_DOMAIN, 'google.com', gs_utils.PERMISSION_READ),
60 ]
borenet 2014/07/18 22:11:12 I would strongly prefer that these go into gs_util
epoger 2014/07/21 13:42:51 Given that the buildbots write SKP files into Goog
borenet 2014/07/21 14:07:46 I like #1 and #3 (though I really don't like the "
epoger 2014/07/21 20:01:31 Cool idea. I went with it... in order to do it wi
61 BOTO_CREDENTIALS_FILE = os.path.join(
62 BUILDBOT_PATH, 'third_party', 'chromium_buildbot', 'site_config', '.boto')
epoger 2014/07/18 21:10:24 This is where we already put the .boto file on the
borenet 2014/07/21 14:07:46 If it's okay with you, let's leave it as-is, since
epoger 2014/07/21 20:01:31 Now, users of gs_utils.py within buildbot automati
56 63
57 64
58 class BuildStepWarning(Exception): 65 class BuildStepWarning(Exception):
59 pass 66 pass
60 67
61 68
62 class BuildStepFailure(Exception): 69 class BuildStepFailure(Exception):
63 pass 70 pass
64 71
65 72
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 else: 399 else:
393 raise BuildStepFailure('Build step failed.') 400 raise BuildStepFailure('Build step failed.')
394 except Exception: 401 except Exception:
395 print traceback.format_exc() 402 print traceback.format_exc()
396 if attempt + 1 >= step.attempts: 403 if attempt + 1 >= step.attempts:
397 raise 404 raise
398 # pylint: disable=W0212 405 # pylint: disable=W0212
399 step._WaitFunc(attempt) 406 step._WaitFunc(attempt)
400 attempt += 1 407 attempt += 1
401 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) 408 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698