libv8 6.0.286.44.0beta1 → 6.0.286.54.0beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -2
- data/ext/libv8/location.rb +1 -1
- data/ext/libv8/paths.rb +1 -1
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +1 -1
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +9 -11
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +1 -1
- data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +1 -1
- data/patches/0005-Fix-GCC-7-build-errors.patch +1 -1
- data/spec/location_spec.rb +1 -1
- data/vendor/depot_tools/.gitattributes +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/win_tools.bat +1 -1
- data/vendor/depot_tools/cipd +2 -3
- data/vendor/depot_tools/cipd.ps1 +2 -6
- data/vendor/depot_tools/cipd_bin_setup.bat +1 -1
- data/vendor/depot_tools/cipd_bin_setup.sh +3 -1
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cpplint.py +0 -31
- data/vendor/depot_tools/gclient.py +162 -88
- data/vendor/depot_tools/gclient_utils.py +5 -0
- data/vendor/depot_tools/gerrit_client.py +0 -0
- data/vendor/depot_tools/gerrit_util.py +2 -2
- data/vendor/depot_tools/git_cl.py +25 -12
- data/vendor/depot_tools/infra/config/recipes.cfg +2 -2
- data/vendor/depot_tools/led +1 -1
- data/vendor/depot_tools/led.bat +1 -1
- data/vendor/depot_tools/my_activity.py +26 -16
- data/vendor/depot_tools/presubmit_canned_checks.py +1 -1
- data/vendor/depot_tools/presubmit_support.py +15 -4
- data/vendor/depot_tools/recipes/README.recipes.md +21 -14
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +18 -11
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/apply_gerrit_ref_custom.json +29 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_empty_revision.json +156 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +27 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +11 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +8 -9
- data/vendor/depot_tools/recipes/recipes.py +2 -2
- data/vendor/depot_tools/recipes/recipes/fetch_end_to_end_test.expected/basic.json +162 -0
- data/vendor/depot_tools/recipes/recipes/fetch_end_to_end_test.py +53 -0
- data/vendor/depot_tools/update_depot_tools +13 -7
- data/vendor/depot_tools/update_depot_tools.bat +7 -2
- data/vendor/depot_tools/vpython +1 -1
- data/vendor/depot_tools/vpython.bat +1 -1
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +7 -3
- data/vendor/v8/AUTHORS +1 -0
- data/vendor/v8/codereview.settings +2 -4
- data/vendor/v8/include/v8-version.h +1 -1
- data/vendor/v8/src/builtins/builtins-array-gen.cc +1 -0
- data/vendor/v8/src/compiler/escape-analysis.cc +1 -4
- data/vendor/v8/src/compiler/load-elimination.cc +1 -1
- data/vendor/v8/src/d8.cc +1 -0
- data/vendor/v8/src/map-updater.cc +39 -2
- data/vendor/v8/src/map-updater.h +9 -2
- data/vendor/v8/src/objects-debug.cc +7 -1
- data/vendor/v8/src/objects.cc +33 -6
- data/vendor/v8/src/objects.h +0 -1
- data/vendor/v8/src/objects/map-inl.h +15 -0
- data/vendor/v8/src/objects/map.h +6 -0
- data/vendor/v8/src/v8.gyp +7 -0
- data/vendor/v8/src/wasm/wasm-module.cc +10 -8
- data/vendor/v8/tools/run-tests.py +1 -1
- metadata +6 -5
- data/vendor/depot_tools/win_toolchain/7z/7z.dll +0 -0
- data/vendor/depot_tools/win_toolchain/7z/7z.exe +0 -0
- data/vendor/depot_tools/win_toolchain/7z/LICENSE +0 -57
@@ -92,6 +92,11 @@ def IsGitSha(revision):
|
|
92
92
|
return re.match('^[a-fA-F0-9]{6,40}$', revision) is not None
|
93
93
|
|
94
94
|
|
95
|
+
def IsFullGitSha(revision):
|
96
|
+
"""Returns true if the given string is a valid hex-encoded full sha"""
|
97
|
+
return re.match('^[a-fA-F0-9]{40}$', revision) is not None
|
98
|
+
|
99
|
+
|
95
100
|
def IsDateRevision(revision):
|
96
101
|
"""Returns true if the given revision is of the form "{ ... }"."""
|
97
102
|
return bool(revision and re.match(r'^\{.+\}$', str(revision)))
|
File without changes
|
@@ -228,8 +228,8 @@ class GceAuthenticator(Authenticator):
|
|
228
228
|
"""
|
229
229
|
|
230
230
|
_INFO_URL = 'http://metadata.google.internal'
|
231
|
-
_ACQUIRE_URL = ('
|
232
|
-
'service-accounts/default/token')
|
231
|
+
_ACQUIRE_URL = ('%s/computeMetadata/v1/instance/'
|
232
|
+
'service-accounts/default/token' % _INFO_URL)
|
233
233
|
_ACQUIRE_HEADERS = {"Metadata-Flavor": "Google"}
|
234
234
|
|
235
235
|
_cache_is_gce = None
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
3
3
|
# Use of this source code is governed by a BSD-style license that can be
|
4
4
|
# found in the LICENSE file.
|
5
5
|
|
@@ -3823,7 +3823,13 @@ class _GitCookiesChecker(object):
|
|
3823
3823
|
@staticmethod
|
3824
3824
|
def _parse_identity(identity):
|
3825
3825
|
"""Parses identity "git-<ldap>.example.com" into <ldap> and domain."""
|
3826
|
-
|
3826
|
+
# Special case: users whose ldaps contain ".", which are generally not
|
3827
|
+
# distinguishable from sub-domains. But we do know typical domains:
|
3828
|
+
if identity.endswith('.chromium.org'):
|
3829
|
+
domain = 'chromium.org'
|
3830
|
+
username = identity[:-len('.chromium.org')]
|
3831
|
+
else:
|
3832
|
+
username, domain = identity.split('.', 1)
|
3827
3833
|
if username.startswith('git-'):
|
3828
3834
|
username = username[len('git-'):]
|
3829
3835
|
return username, domain
|
@@ -5813,6 +5819,8 @@ def CMDformat(parser, args):
|
|
5813
5819
|
help='Format javascript code with clang-format.')
|
5814
5820
|
parser.add_option('--diff', action='store_true',
|
5815
5821
|
help='Print diff to stdout rather than modifying files.')
|
5822
|
+
parser.add_option('--presubmit', action='store_true',
|
5823
|
+
help='Used when running the script from a presubmit.')
|
5816
5824
|
opts, args = parser.parse_args(args)
|
5817
5825
|
|
5818
5826
|
# Normalize any remaining args against the current path, so paths relative to
|
@@ -5955,16 +5963,21 @@ def CMDformat(parser, args):
|
|
5955
5963
|
DieWithError("gn format failed on " + gn_diff_file +
|
5956
5964
|
"\nTry running 'gn format' on this file manually.")
|
5957
5965
|
|
5958
|
-
|
5959
|
-
|
5960
|
-
|
5961
|
-
|
5962
|
-
|
5963
|
-
|
5964
|
-
|
5965
|
-
|
5966
|
-
|
5967
|
-
|
5966
|
+
# Skip the metrics formatting from the global presubmit hook. These files have
|
5967
|
+
# a separate presubmit hook that issues an error if the files need formatting,
|
5968
|
+
# whereas the top-level presubmit script merely issues a warning. Formatting
|
5969
|
+
# these files is somewhat slow, so it's important not to duplicate the work.
|
5970
|
+
if not opts.presubmit:
|
5971
|
+
for xml_dir in GetDirtyMetricsDirs(diff_files):
|
5972
|
+
tool_dir = os.path.join(top_dir, xml_dir)
|
5973
|
+
cmd = [os.path.join(tool_dir, 'pretty_print.py'), '--non-interactive']
|
5974
|
+
if opts.dry_run or opts.diff:
|
5975
|
+
cmd.append('--diff')
|
5976
|
+
stdout = RunCommand(cmd, cwd=top_dir)
|
5977
|
+
if opts.diff:
|
5978
|
+
sys.stdout.write(stdout)
|
5979
|
+
if opts.dry_run and stdout:
|
5980
|
+
return_value = 2 # Not formatted.
|
5968
5981
|
|
5969
5982
|
return return_value
|
5970
5983
|
|
@@ -15,8 +15,8 @@
|
|
15
15
|
"deps": {
|
16
16
|
"recipe_engine": {
|
17
17
|
"branch": "master",
|
18
|
-
"revision": "
|
19
|
-
"url": "https://chromium.googlesource.com/
|
18
|
+
"revision": "d0acc08657c0d71e8388c6e2903e2b7aa205f0d6",
|
19
|
+
"url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
|
20
20
|
}
|
21
21
|
},
|
22
22
|
"project_id": "depot_tools",
|
data/vendor/depot_tools/led
CHANGED
data/vendor/depot_tools/led.bat
CHANGED
@@ -70,6 +70,7 @@ rietveld_instances = [
|
|
70
70
|
'supports_owner_modified_query': True,
|
71
71
|
'requires_auth': False,
|
72
72
|
'email_domain': 'chromium.org',
|
73
|
+
'short_url_protocol': 'https',
|
73
74
|
},
|
74
75
|
{
|
75
76
|
'url': 'chromereviews.googleplex.com',
|
@@ -96,10 +97,12 @@ gerrit_instances = [
|
|
96
97
|
{
|
97
98
|
'url': 'chromium-review.googlesource.com',
|
98
99
|
'shorturl': 'crrev.com/c',
|
100
|
+
'short_url_protocol': 'https',
|
99
101
|
},
|
100
102
|
{
|
101
103
|
'url': 'chrome-internal-review.googlesource.com',
|
102
104
|
'shorturl': 'crrev.com/i',
|
105
|
+
'short_url_protocol': 'https',
|
103
106
|
},
|
104
107
|
{
|
105
108
|
'url': 'android-review.googlesource.com',
|
@@ -110,6 +113,7 @@ google_code_projects = [
|
|
110
113
|
{
|
111
114
|
'name': 'chromium',
|
112
115
|
'shorturl': 'crbug.com',
|
116
|
+
'short_url_protocol': 'https',
|
113
117
|
},
|
114
118
|
{
|
115
119
|
'name': 'google-breakpad',
|
@@ -299,11 +303,14 @@ class MyActivity(object):
|
|
299
303
|
|
300
304
|
ret['reviewers'] = set(issue['reviewers'])
|
301
305
|
|
302
|
-
shorturl = instance['url']
|
303
306
|
if 'shorturl' in instance:
|
304
|
-
|
307
|
+
url = instance['shorturl']
|
308
|
+
protocol = instance.get('short_url_protocol', 'http')
|
309
|
+
else:
|
310
|
+
url = instance['url']
|
311
|
+
protocol = 'https'
|
305
312
|
|
306
|
-
ret['review_url'] = '
|
313
|
+
ret['review_url'] = '%s://%s/%d' % (protocol, url, issue['issue'])
|
307
314
|
|
308
315
|
# Rietveld sometimes has '\r\n' instead of '\n'.
|
309
316
|
ret['header'] = issue['description'].replace('\r', '').split('\n')[0]
|
@@ -388,10 +395,13 @@ class MyActivity(object):
|
|
388
395
|
'+{insertions},-{deletions}',
|
389
396
|
**issue)
|
390
397
|
ret['status'] = issue['status']
|
391
|
-
ret['review_url'] = issue['url']
|
392
398
|
if 'shorturl' in instance:
|
393
|
-
|
394
|
-
|
399
|
+
protocol = instance.get('short_url_protocol', 'http')
|
400
|
+
ret['review_url'] = '%s://%s/%s' % (protocol, instance['shorturl'],
|
401
|
+
issue['number'])
|
402
|
+
else:
|
403
|
+
ret['review_url'] = issue['url']
|
404
|
+
|
395
405
|
ret['header'] = issue['subject']
|
396
406
|
ret['owner'] = issue['owner']['email']
|
397
407
|
ret['author'] = ret['owner']
|
@@ -425,12 +435,14 @@ class MyActivity(object):
|
|
425
435
|
'+{insertions},-{deletions}',
|
426
436
|
**issue)
|
427
437
|
ret['status'] = issue['status']
|
428
|
-
ret['review_url'] = 'https://%s/%s' % (instance['url'], issue['_number'])
|
429
438
|
if 'shorturl' in instance:
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
439
|
+
protocol = instance.get('short_url_protocol', 'http')
|
440
|
+
url = instance['shorturl']
|
441
|
+
else:
|
442
|
+
protocol = 'https'
|
443
|
+
url = instance['url']
|
444
|
+
ret['review_url'] = '%s://%s/%s' % (protocol, url, issue['_number'])
|
445
|
+
|
434
446
|
ret['header'] = issue['subject']
|
435
447
|
ret['owner'] = issue['owner']['email']
|
436
448
|
ret['author'] = ret['owner']
|
@@ -487,7 +499,8 @@ class MyActivity(object):
|
|
487
499
|
items = content['items']
|
488
500
|
for item in items:
|
489
501
|
if instance.get('shorturl'):
|
490
|
-
|
502
|
+
protocol = instance.get('short_url_protocol', 'http')
|
503
|
+
item_url = '%s://%s/%d' % (protocol, instance['shorturl'], item['id'])
|
491
504
|
else:
|
492
505
|
item_url = 'https://bugs.chromium.org/p/%s/issues/detail?id=%d' % (
|
493
506
|
instance['name'], item['id'])
|
@@ -502,9 +515,6 @@ class MyActivity(object):
|
|
502
515
|
'labels': [],
|
503
516
|
'components': []
|
504
517
|
}
|
505
|
-
if 'shorturl' in instance:
|
506
|
-
issue['url'] = 'http://%s/%d' % (instance['shorturl'], item['id'])
|
507
|
-
|
508
518
|
if 'owner' in item:
|
509
519
|
issue['owner'] = item['owner']['name']
|
510
520
|
else:
|
@@ -902,7 +912,7 @@ def main():
|
|
902
912
|
logging.info('Printing output to "%s"', options.output)
|
903
913
|
sys.stdout = output_file
|
904
914
|
except (IOError, OSError) as e:
|
905
|
-
|
915
|
+
logging.error('Unable to write output: %s', e)
|
906
916
|
else:
|
907
917
|
if options.json:
|
908
918
|
my_activity.dump_json()
|
@@ -1088,7 +1088,7 @@ def PanProjectChecks(input_api, output_api,
|
|
1088
1088
|
|
1089
1089
|
def CheckPatchFormatted(input_api, output_api, check_js=False):
|
1090
1090
|
import git_cl
|
1091
|
-
cmd = ['cl', 'format', '--dry-run']
|
1091
|
+
cmd = ['cl', 'format', '--dry-run', '--presubmit']
|
1092
1092
|
if check_js:
|
1093
1093
|
cmd.append('--js')
|
1094
1094
|
cmd.append(input_api.PresubmitLocalPath())
|
@@ -12,6 +12,7 @@ __version__ = '1.8.0'
|
|
12
12
|
# caching (between all different invocations of presubmit scripts for a given
|
13
13
|
# change). We should add it as our presubmit scripts start feeling slow.
|
14
14
|
|
15
|
+
import ast # Exposed through the API.
|
15
16
|
import cpplint
|
16
17
|
import cPickle # Exposed through the API.
|
17
18
|
import cStringIO # Exposed through the API.
|
@@ -247,10 +248,19 @@ class GerritAccessor(object):
|
|
247
248
|
return self.GetChangeInfo(issue)['owner']['email']
|
248
249
|
|
249
250
|
def GetChangeReviewers(self, issue, approving_only=True):
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
251
|
+
changeinfo = self.GetChangeInfo(issue)
|
252
|
+
if approving_only:
|
253
|
+
labelinfo = changeinfo.get('labels', {}).get('Code-Review', {})
|
254
|
+
values = labelinfo.get('values', {}).keys()
|
255
|
+
try:
|
256
|
+
max_value = max(int(v) for v in values)
|
257
|
+
reviewers = [r for r in labelinfo.get('all', [])
|
258
|
+
if r.get('value', 0) == max_value]
|
259
|
+
except ValueError: # values is the empty list
|
260
|
+
reviewers = []
|
261
|
+
else:
|
262
|
+
reviewers = changeinfo.get('reviewers', {}).get('REVIEWER', [])
|
263
|
+
return [r.get('email') for r in reviewers]
|
254
264
|
|
255
265
|
|
256
266
|
class OutputApi(object):
|
@@ -393,6 +403,7 @@ class InputApi(object):
|
|
393
403
|
|
394
404
|
# We expose various modules and functions as attributes of the input_api
|
395
405
|
# so that presubmit scripts don't have to import them.
|
406
|
+
self.ast = ast
|
396
407
|
self.basename = os.path.basename
|
397
408
|
self.cPickle = cPickle
|
398
409
|
self.cpplint = cpplint
|
@@ -22,6 +22,7 @@
|
|
22
22
|
* [cipd:examples/full](#recipes-cipd_examples_full)
|
23
23
|
* [cipd:examples/platform_suffix](#recipes-cipd_examples_platform_suffix)
|
24
24
|
* [depot_tools:examples/full](#recipes-depot_tools_examples_full)
|
25
|
+
* [fetch_end_to_end_test](#recipes-fetch_end_to_end_test)
|
25
26
|
* [gclient:examples/full](#recipes-gclient_examples_full)
|
26
27
|
* [gclient:tests/patch_project](#recipes-gclient_tests_patch_project)
|
27
28
|
* [gerrit:examples/full](#recipes-gerrit_examples_full)
|
@@ -47,14 +48,14 @@ Recipe module to ensure a checkout is consistent on a bot.
|
|
47
48
|
|
48
49
|
Wrapper for easy calling of bot_update.
|
49
50
|
|
50
|
-
— **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#49)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, \*\*kwargs):**
|
51
|
+
— **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#49)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, gerrit_repo=None, gerrit_ref=None, step_name='apply_gerrit', \*\*kwargs):**
|
51
52
|
|
52
|
-
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#
|
53
|
+
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#434)(self, bot_update_step):**
|
53
54
|
|
54
55
|
Deapplies a patch, taking care of DEPS and solution revisions properly.
|
55
56
|
|
56
57
|
|
57
|
-
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#
|
58
|
+
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#71)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, no_shallow=False, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=False, oauth2_json=False, use_site_config_creds=True, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, \*\*kwargs):**
|
58
59
|
|
59
60
|
Args:
|
60
61
|
use_site_config_creds: If the oauth2 credentials are in the buildbot
|
@@ -71,7 +72,7 @@ Args:
|
|
71
72
|
Needed as migration paths for recipes dealing with older revisions,
|
72
73
|
such as bisect.
|
73
74
|
|
74
|
-
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#
|
75
|
+
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#411)(self, project_name, gclient_config=None):**
|
75
76
|
|
76
77
|
Returns all property names used for storing the checked-out revision of
|
77
78
|
a given project.
|
@@ -764,6 +765,11 @@ like checkout or compile), and some of these tests have failed.
|
|
764
765
|
[DEPS](/recipes/recipe_modules/depot_tools/examples/full.py#5): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
765
766
|
|
766
767
|
— **def [RunSteps](/recipes/recipe_modules/depot_tools/examples/full.py#13)(api):**
|
768
|
+
### *recipes* / [fetch\_end\_to\_end\_test](/recipes/recipes/fetch_end_to_end_test.py)
|
769
|
+
|
770
|
+
[DEPS](/recipes/recipes/fetch_end_to_end_test.py#5): [bot\_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
771
|
+
|
772
|
+
— **def [RunSteps](/recipes/recipes/fetch_end_to_end_test.py#16)(api):**
|
767
773
|
### *recipes* / [gclient:examples/full](/recipes/recipe_modules/gclient/examples/full.py)
|
768
774
|
|
769
775
|
[DEPS](/recipes/recipe_modules/gclient/examples/full.py#5): [gclient](#recipe_modules-gclient), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
@@ -822,13 +828,14 @@ Move things around in a loop!
|
|
822
828
|
|
823
829
|
— **def [RunSteps](/recipes/recipe_modules/tryserver/examples/full.py#17)(api):**
|
824
830
|
|
825
|
-
[recipe_engine/recipe_modules/context]: https://
|
826
|
-
[recipe_engine/recipe_modules/
|
827
|
-
[recipe_engine/recipe_modules/
|
828
|
-
[recipe_engine/recipe_modules/
|
829
|
-
[recipe_engine/recipe_modules/
|
830
|
-
[recipe_engine/recipe_modules/
|
831
|
-
[recipe_engine/recipe_modules/
|
832
|
-
[recipe_engine/recipe_modules/
|
833
|
-
[recipe_engine/recipe_modules/
|
834
|
-
[recipe_engine/
|
831
|
+
[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-context
|
832
|
+
[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-file
|
833
|
+
[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-json
|
834
|
+
[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-path
|
835
|
+
[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-platform
|
836
|
+
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-properties
|
837
|
+
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-python
|
838
|
+
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-raw_io
|
839
|
+
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-step
|
840
|
+
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/README.recipes.md#recipe_modules-url
|
841
|
+
[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/d0acc08657c0d71e8388c6e2903e2b7aa205f0d6/recipe_engine/recipe_api.py#992
|
@@ -47,12 +47,14 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
47
47
|
# DO NOT USE.
|
48
48
|
# TODO(tandrii): refactor this into tryserver.maybe_apply_patch
|
49
49
|
def apply_gerrit_ref(self, root, gerrit_no_reset=False,
|
50
|
-
gerrit_no_rebase_patch_ref=False,
|
50
|
+
gerrit_no_rebase_patch_ref=False,
|
51
|
+
gerrit_repo=None, gerrit_ref=None,
|
52
|
+
step_name='apply_gerrit', **kwargs):
|
51
53
|
apply_gerrit_path = self.resource('apply_gerrit.py')
|
52
54
|
kwargs.setdefault('infra_step', True)
|
53
55
|
cmd = [
|
54
|
-
'--gerrit_repo', self._repository,
|
55
|
-
'--gerrit_ref', self._gerrit_ref or '',
|
56
|
+
'--gerrit_repo', gerrit_repo or self._repository,
|
57
|
+
'--gerrit_ref', gerrit_ref or self._gerrit_ref or '',
|
56
58
|
'--root', str(root),
|
57
59
|
]
|
58
60
|
if gerrit_no_reset:
|
@@ -64,7 +66,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
64
66
|
'PATH': [self.m.depot_tools.root],
|
65
67
|
}
|
66
68
|
with self.m.context(env_prefixes=env_prefixes):
|
67
|
-
return self.m.python(
|
69
|
+
return self.m.python(step_name, apply_gerrit_path, cmd, **kwargs)
|
68
70
|
|
69
71
|
def ensure_checkout(self, gclient_config=None, suffix=None,
|
70
72
|
patch=True, update_presentation=True,
|
@@ -194,28 +196,33 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
194
196
|
['--output_json', self.m.json.output()],
|
195
197
|
]
|
196
198
|
|
197
|
-
|
198
|
-
# Collect all fixed revisions to simulate them in the json output.
|
199
|
-
# Fixed revision are the explicit input revisions of bot_update.py, i.e.
|
200
|
-
# every command line parameter "--revision name@value".
|
201
|
-
fixed_revisions = {}
|
202
|
-
|
199
|
+
# Compute requested revisions.
|
203
200
|
revisions = {}
|
204
201
|
for solution in cfg.solutions:
|
205
202
|
if solution.revision:
|
206
203
|
revisions[solution.name] = solution.revision
|
207
204
|
elif solution == cfg.solutions[0]:
|
205
|
+
# TODO(machenbach): We should explicitly pass HEAD for ALL solutions
|
206
|
+
# that don't specify anything else.
|
208
207
|
revisions[solution.name] = (
|
209
208
|
self._parent_got_revision or
|
210
209
|
self._revision or
|
211
210
|
'HEAD')
|
212
211
|
if self.m.gclient.c and self.m.gclient.c.revisions:
|
213
|
-
|
212
|
+
# Only update with non-empty values. Some recipe might otherwise
|
213
|
+
# overwrite the HEAD default with an empty string.
|
214
|
+
revisions.update(
|
215
|
+
(k, v) for k, v in self.m.gclient.c.revisions.iteritems() if v)
|
214
216
|
if cfg.solutions and root_solution_revision:
|
215
217
|
revisions[cfg.solutions[0].name] = root_solution_revision
|
216
218
|
# Allow for overrides required to bisect into rolls.
|
217
219
|
revisions.update(self._deps_revision_overrides)
|
220
|
+
|
218
221
|
# Compute command-line parameters for requested revisions.
|
222
|
+
# Also collect all fixed revisions to simulate them in the json output.
|
223
|
+
# Fixed revision are the explicit input revisions of bot_update.py, i.e.
|
224
|
+
# every command line parameter "--revision name@value".
|
225
|
+
fixed_revisions = {}
|
219
226
|
for name, revision in sorted(revisions.items()):
|
220
227
|
fixed_revision = self.m.gclient.resolve_revision(revision)
|
221
228
|
if fixed_revision:
|
@@ -0,0 +1,29 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"cmd": [
|
4
|
+
"python",
|
5
|
+
"-u",
|
6
|
+
"RECIPE_MODULE[depot_tools::bot_update]/resources/apply_gerrit.py",
|
7
|
+
"--gerrit_repo",
|
8
|
+
"https://custom/repo",
|
9
|
+
"--gerrit_ref",
|
10
|
+
"refs/changes/custom/1234567/1",
|
11
|
+
"--root",
|
12
|
+
"/tmp/test/root",
|
13
|
+
"--gerrit_no_reset",
|
14
|
+
"--gerrit_no_rebase_patch_ref"
|
15
|
+
],
|
16
|
+
"env_prefixes": {
|
17
|
+
"PATH": [
|
18
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
19
|
+
]
|
20
|
+
},
|
21
|
+
"infra_step": true,
|
22
|
+
"name": "Custom apply gerrit step"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"name": "$result",
|
26
|
+
"recipe_result": null,
|
27
|
+
"status_code": 0
|
28
|
+
}
|
29
|
+
]
|
@@ -0,0 +1,156 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"cmd": [
|
4
|
+
"python",
|
5
|
+
"-u",
|
6
|
+
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
7
|
+
"--spec-path",
|
8
|
+
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
9
|
+
"--patch_root",
|
10
|
+
"src",
|
11
|
+
"--revision_mapping_file",
|
12
|
+
"{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
|
13
|
+
"--git-cache-dir",
|
14
|
+
"[GIT_CACHE]",
|
15
|
+
"--cleanup-dir",
|
16
|
+
"[CLEANUP]/bot_update",
|
17
|
+
"--issue",
|
18
|
+
"12345",
|
19
|
+
"--patchset",
|
20
|
+
"654321",
|
21
|
+
"--rietveld_server",
|
22
|
+
"https://rietveld.example.com/",
|
23
|
+
"--output_json",
|
24
|
+
"/path/to/tmp/json",
|
25
|
+
"--revision",
|
26
|
+
"src@HEAD",
|
27
|
+
"--disable-syntax-validation"
|
28
|
+
],
|
29
|
+
"env_prefixes": {
|
30
|
+
"PATH": [
|
31
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
32
|
+
]
|
33
|
+
},
|
34
|
+
"infra_step": true,
|
35
|
+
"name": "bot_update",
|
36
|
+
"~followup_annotations": [
|
37
|
+
"@@@STEP_TEXT@Some step text@@@",
|
38
|
+
"@@@STEP_LOG_LINE@json.output@{@@@",
|
39
|
+
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
40
|
+
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
41
|
+
"@@@STEP_LOG_LINE@json.output@ \"src\": \"HEAD\"@@@",
|
42
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
43
|
+
"@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
|
44
|
+
"@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
|
45
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src.git\", @@@",
|
46
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
47
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
48
|
+
"@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": {@@@",
|
49
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/third_party/angle.git\", @@@",
|
50
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@",
|
51
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
52
|
+
"@@@STEP_LOG_LINE@json.output@ \"src/v8\": {@@@",
|
53
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/v8.git\", @@@",
|
54
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"801ada225ddc271c132c3a35f03975671d43e399\"@@@",
|
55
|
+
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
56
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
57
|
+
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
58
|
+
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
59
|
+
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
60
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_angle_revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\", @@@",
|
61
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_angle_revision_cp\": \"refs/heads/master@{#297276}\", @@@",
|
62
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
63
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/master@{#170242}\", @@@",
|
64
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
65
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#170242}\", @@@",
|
66
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_v8_revision\": \"801ada225ddc271c132c3a35f03975671d43e399\", @@@",
|
67
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_v8_revision_cp\": \"refs/heads/master@{#43426}\"@@@",
|
68
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
69
|
+
"@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
|
70
|
+
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
71
|
+
"@@@STEP_LOG_LINE@json.output@}@@@",
|
72
|
+
"@@@STEP_LOG_END@json.output@@@",
|
73
|
+
"@@@SET_BUILD_PROPERTY@got_angle_revision@\"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@",
|
74
|
+
"@@@SET_BUILD_PROPERTY@got_angle_revision_cp@\"refs/heads/master@{#297276}\"@@@",
|
75
|
+
"@@@SET_BUILD_PROPERTY@got_cr_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
76
|
+
"@@@SET_BUILD_PROPERTY@got_cr_revision_cp@\"refs/heads/master@{#170242}\"@@@",
|
77
|
+
"@@@SET_BUILD_PROPERTY@got_revision@\"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
78
|
+
"@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#170242}\"@@@",
|
79
|
+
"@@@SET_BUILD_PROPERTY@got_v8_revision@\"801ada225ddc271c132c3a35f03975671d43e399\"@@@",
|
80
|
+
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"cmd": [
|
85
|
+
"python",
|
86
|
+
"-u",
|
87
|
+
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
88
|
+
"--spec-path",
|
89
|
+
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
90
|
+
"--patch_root",
|
91
|
+
"src",
|
92
|
+
"--revision_mapping_file",
|
93
|
+
"{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
|
94
|
+
"--git-cache-dir",
|
95
|
+
"[GIT_CACHE]",
|
96
|
+
"--cleanup-dir",
|
97
|
+
"[CLEANUP]/bot_update",
|
98
|
+
"--rietveld_server",
|
99
|
+
"https://rietveld.example.com/",
|
100
|
+
"--output_json",
|
101
|
+
"/path/to/tmp/json",
|
102
|
+
"--revision",
|
103
|
+
"src@f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9"
|
104
|
+
],
|
105
|
+
"env_prefixes": {
|
106
|
+
"PATH": [
|
107
|
+
"RECIPE_PACKAGE_REPO[depot_tools]"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
"infra_step": true,
|
111
|
+
"name": "bot_update (without patch)",
|
112
|
+
"~followup_annotations": [
|
113
|
+
"@@@STEP_TEXT@Some step text@@@",
|
114
|
+
"@@@STEP_LOG_LINE@json.output@{@@@",
|
115
|
+
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
|
116
|
+
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
|
117
|
+
"@@@STEP_LOG_LINE@json.output@ \"src\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
118
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
119
|
+
"@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
|
120
|
+
"@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
|
121
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src.git\", @@@",
|
122
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\"@@@",
|
123
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
124
|
+
"@@@STEP_LOG_LINE@json.output@ \"src/third_party/angle\": {@@@",
|
125
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/third_party/angle.git\", @@@",
|
126
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\"@@@",
|
127
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
128
|
+
"@@@STEP_LOG_LINE@json.output@ \"src/v8\": {@@@",
|
129
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/src/v8.git\", @@@",
|
130
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"801ada225ddc271c132c3a35f03975671d43e399\"@@@",
|
131
|
+
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
132
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
133
|
+
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
|
134
|
+
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"src\", @@@",
|
135
|
+
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
136
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_angle_revision\": \"fac9503c46405f77757b9a728eb85b8d7bc6080c\", @@@",
|
137
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_angle_revision_cp\": \"refs/heads/master@{#297276}\", @@@",
|
138
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
139
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_cr_revision_cp\": \"refs/heads/master@{#170242}\", @@@",
|
140
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", @@@",
|
141
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#170242}\", @@@",
|
142
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_v8_revision\": \"801ada225ddc271c132c3a35f03975671d43e399\", @@@",
|
143
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_v8_revision_cp\": \"refs/heads/master@{#43426}\"@@@",
|
144
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
145
|
+
"@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
|
146
|
+
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
|
147
|
+
"@@@STEP_LOG_LINE@json.output@}@@@",
|
148
|
+
"@@@STEP_LOG_END@json.output@@@"
|
149
|
+
]
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "$result",
|
153
|
+
"recipe_result": null,
|
154
|
+
"status_code": 0
|
155
|
+
}
|
156
|
+
]
|