libv8 7.3.492.27.1 → 7.3.492.27.3beta1
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 -0
- data/ext/libv8/builder.rb +1 -2
- data/lib/libv8/version.rb +1 -1
- data/vendor/depot_tools/.gitignore +4 -1
- data/vendor/depot_tools/autoninja.bat +8 -0
- data/vendor/depot_tools/autoninja.py +1 -1
- data/vendor/depot_tools/cipd_manifest.txt +2 -2
- data/vendor/depot_tools/cipd_manifest.versions +52 -52
- data/vendor/depot_tools/gclient.py +4 -1
- data/vendor/depot_tools/gclient_scm.py +17 -6
- data/vendor/depot_tools/git_cache.py +109 -128
- data/vendor/depot_tools/git_cl.py +98 -26
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/man/src/filter_demo_output.py +1 -1
- data/vendor/depot_tools/metrics.README.md +3 -3
- data/vendor/depot_tools/metrics.py +3 -2
- data/vendor/depot_tools/metrics_utils.py +1 -11
- data/vendor/depot_tools/owners.py +109 -32
- data/vendor/depot_tools/patch.py +1 -1
- data/vendor/depot_tools/recipes/README.recipes.md +23 -20
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +1 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +67 -51
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_rebase_patch_ref.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/gerrit_no_reset.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/input_commit_with_id_without_repo.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/multiple_patch_refs.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_apply_patch_on_gclient.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json +57 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_branch_head.json +59 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json +57 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_master.json +59 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/refs.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/reset_root_solution_revision.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +9 -2
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_branch_heads.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_feature_branch.json +11 -2
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_v8_feature_branch.json +9 -2
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_webrtc.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +8 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json +0 -7
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/with_tags.json +7 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +92 -3
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +2 -2
- data/vendor/depot_tools/scm.py +1 -1
- data/vendor/depot_tools/upload_to_google_storage.py +1 -1
- metadata +8 -4
data/vendor/depot_tools/patch.py
CHANGED
@@ -60,7 +60,7 @@ class FilePatchBase(object):
|
|
60
60
|
if filename == 'CON':
|
61
61
|
raise UnsupportedPatchFormat(
|
62
62
|
filename, 'Filename can\'t be \'CON\'.')
|
63
|
-
if re.match('COM\d', filename):
|
63
|
+
if re.match(r'COM\d', filename):
|
64
64
|
raise UnsupportedPatchFormat(
|
65
65
|
filename, 'Filename can\'t be \'%s\'.' % filename)
|
66
66
|
return filename
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
### *recipe_modules* / [bot\_update](/recipes/recipe_modules/bot_update)
|
44
44
|
|
45
|
-
[DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/source\_manifest][recipe_engine/recipe_modules/source_manifest], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
45
|
+
[DEPS](/recipes/recipe_modules/bot_update/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [gitiles](#recipe_modules-gitiles), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/commit\_position][recipe_engine/recipe_modules/commit_position], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/source\_manifest][recipe_engine/recipe_modules/source_manifest], [recipe\_engine/step][recipe_engine/recipe_modules/step]
|
46
46
|
|
47
47
|
Recipe module to ensure a checkout is consistent on a bot.
|
48
48
|
|
@@ -52,12 +52,12 @@ Recipe module to ensure a checkout is consistent on a bot.
|
|
52
52
|
|
53
53
|
Wrapper for easy calling of bot_update.
|
54
54
|
|
55
|
-
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#
|
55
|
+
— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#468)(self, bot_update_step):**
|
56
56
|
|
57
57
|
Deapplies a patch, taking care of DEPS and solution revisions properly.
|
58
58
|
|
59
59
|
|
60
|
-
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#68)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, 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, manifest_name=None, patch_refs=None, ignore_input_commit=False, set_output_commit=False, \*\*kwargs):**
|
60
|
+
— **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#68)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=None, oauth2_json=None, use_site_config_creds=None, 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, manifest_name=None, patch_refs=None, ignore_input_commit=False, set_output_commit=False, step_test_data=None, \*\*kwargs):**
|
61
61
|
|
62
62
|
Args:
|
63
63
|
gclient_config: The gclient configuration to use when running bot_update.
|
@@ -76,8 +76,10 @@ Args:
|
|
76
76
|
api.buildbucket.gitiles_commit or the first configured solution.
|
77
77
|
When sorting builds by commit position, this commit will be used.
|
78
78
|
Requires falsy ignore_input_commit.
|
79
|
+
step_test_data: a null function that returns test bot_update.py output.
|
80
|
+
Use test_api.output_json to generate test data.
|
79
81
|
|
80
|
-
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#
|
82
|
+
— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#445)(self, project_name, gclient_config=None):**
|
81
83
|
|
82
84
|
Returns all property names used for storing the checked-out revision of
|
83
85
|
a given project.
|
@@ -901,7 +903,7 @@ Raises:
|
|
901
903
|
|
902
904
|
[DEPS](/recipes/recipe_modules/bot_update/examples/full.py#5): [bot\_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient), [gerrit](#recipe_modules-gerrit), [tryserver](#recipe_modules-tryserver), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime]
|
903
905
|
|
904
|
-
— **def [RunSteps](/recipes/recipe_modules/bot_update/examples/full.py#
|
906
|
+
— **def [RunSteps](/recipes/recipe_modules/bot_update/examples/full.py#22)(api):**
|
905
907
|
### *recipes* / [bot\_update:tests/ensure\_checkout](/recipes/recipe_modules/bot_update/tests/ensure_checkout.py)
|
906
908
|
|
907
909
|
[DEPS](/recipes/recipe_modules/bot_update/tests/ensure_checkout.py#7): [bot\_update](#recipe_modules-bot_update), [gclient](#recipe_modules-gclient), [recipe\_engine/json][recipe_engine/recipe_modules/json]
|
@@ -995,18 +997,19 @@ Move things around in a loop!
|
|
995
997
|
|
996
998
|
— **def [RunSteps](/recipes/recipe_modules/windows_sdk/examples/full.py#13)(api):**
|
997
999
|
|
998
|
-
[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/
|
999
|
-
[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/
|
1000
|
-
[recipe_engine/recipe_modules/
|
1001
|
-
[recipe_engine/recipe_modules/
|
1002
|
-
[recipe_engine/recipe_modules/
|
1003
|
-
[recipe_engine/recipe_modules/
|
1004
|
-
[recipe_engine/recipe_modules/
|
1005
|
-
[recipe_engine/recipe_modules/
|
1006
|
-
[recipe_engine/recipe_modules/
|
1007
|
-
[recipe_engine/recipe_modules/
|
1008
|
-
[recipe_engine/recipe_modules/
|
1009
|
-
[recipe_engine/recipe_modules/
|
1010
|
-
[recipe_engine/recipe_modules/
|
1011
|
-
[recipe_engine/recipe_modules/
|
1012
|
-
[recipe_engine/
|
1000
|
+
[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-buildbucket
|
1001
|
+
[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-cipd
|
1002
|
+
[recipe_engine/recipe_modules/commit_position]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-commit_position
|
1003
|
+
[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-context
|
1004
|
+
[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-file
|
1005
|
+
[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-json
|
1006
|
+
[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-path
|
1007
|
+
[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-platform
|
1008
|
+
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-properties
|
1009
|
+
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-python
|
1010
|
+
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-raw_io
|
1011
|
+
[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-runtime
|
1012
|
+
[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-source_manifest
|
1013
|
+
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-step
|
1014
|
+
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/README.recipes.md#recipe_modules-url
|
1015
|
+
[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0589a429cf3c164004dae4ced4c75784a50afd81/recipe_engine/recipe_api.py#838
|
@@ -76,7 +76,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
76
76
|
gerrit_no_rebase_patch_ref=False,
|
77
77
|
disable_syntax_validation=False, manifest_name=None,
|
78
78
|
patch_refs=None, ignore_input_commit=False,
|
79
|
-
set_output_commit=False,
|
79
|
+
set_output_commit=False, step_test_data=None,
|
80
80
|
**kwargs):
|
81
81
|
"""
|
82
82
|
Args:
|
@@ -96,6 +96,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
96
96
|
api.buildbucket.gitiles_commit or the first configured solution.
|
97
97
|
When sorting builds by commit position, this commit will be used.
|
98
98
|
Requires falsy ignore_input_commit.
|
99
|
+
step_test_data: a null function that returns test bot_update.py output.
|
100
|
+
Use test_api.output_json to generate test data.
|
99
101
|
"""
|
100
102
|
assert use_site_config_creds is None, "use_site_config_creds is deprecated"
|
101
103
|
assert rietveld is None, "rietveld is deprecated"
|
@@ -141,8 +143,12 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
141
143
|
if patch:
|
142
144
|
repo_url = self.m.tryserver.gerrit_change_repo_url
|
143
145
|
fetch_ref = self.m.tryserver.gerrit_change_fetch_ref
|
146
|
+
target_ref = self.m.tryserver.gerrit_change_target_ref
|
144
147
|
if repo_url and fetch_ref:
|
145
|
-
flags.append([
|
148
|
+
flags.append([
|
149
|
+
'--patch_ref',
|
150
|
+
'%s@%s:%s' % (repo_url, target_ref, fetch_ref),
|
151
|
+
])
|
146
152
|
if patch_refs:
|
147
153
|
flags.extend(
|
148
154
|
['--patch_ref', patch_ref]
|
@@ -156,19 +162,16 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
156
162
|
|
157
163
|
# HACK: ensure_checkout API must be redesigned so that we don't pass such
|
158
164
|
# parameters. Existing semantics is too opiniated.
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
if not ignore_input_commit:
|
163
|
-
main_repo_path = self._get_commit_repo_path(input_commit, cfg)
|
165
|
+
in_commit = self.m.buildbucket.gitiles_commit
|
166
|
+
in_commit_rev = in_commit.id or in_commit.ref
|
167
|
+
if not ignore_input_commit and in_commit_rev:
|
164
168
|
# Note: this is not entirely correct. build.input.gitiles_commit
|
165
169
|
# definition says "The Gitiles commit to run against.".
|
166
170
|
# However, here we ignore it if the config specified a revision.
|
167
171
|
# This is necessary because existing builders rely on this behavior,
|
168
172
|
# e.g. they want to force refs/heads/master at the config level.
|
169
|
-
|
170
|
-
|
171
|
-
revisions.get(main_repo_path) or input_commit_rev)
|
173
|
+
main_repo_path = self._get_commit_repo_path(in_commit, cfg)
|
174
|
+
revisions[main_repo_path] = revisions.get(main_repo_path) or in_commit_rev
|
172
175
|
|
173
176
|
# Guarantee that first solution has a revision.
|
174
177
|
# TODO(machenbach): We should explicitly pass HEAD for ALL solutions
|
@@ -196,8 +199,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
196
199
|
if fixed_revision:
|
197
200
|
fixed_revisions[name] = fixed_revision
|
198
201
|
if fixed_revision.upper() == 'HEAD':
|
199
|
-
# Sync to correct destination
|
200
|
-
fixed_revision = self.
|
202
|
+
# Sync to correct destination ref if HEAD was specified.
|
203
|
+
fixed_revision = self._destination_ref(cfg, name)
|
201
204
|
# If we're syncing to a ref, we want to make sure it exists before
|
202
205
|
# trying to check it out.
|
203
206
|
if (fixed_revision.startswith('refs/') and
|
@@ -242,9 +245,9 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
242
245
|
|
243
246
|
# Inject Json output for testing.
|
244
247
|
first_sln = cfg.solutions[0].name
|
245
|
-
step_test_data = lambda: self.test_api.output_json(
|
248
|
+
step_test_data = step_test_data or (lambda: self.test_api.output_json(
|
246
249
|
patch_root, first_sln, reverse_rev_map, self._fail_patch,
|
247
|
-
fixed_revisions=fixed_revisions)
|
250
|
+
fixed_revisions=fixed_revisions))
|
248
251
|
|
249
252
|
name = 'bot_update'
|
250
253
|
if not patch:
|
@@ -291,30 +294,47 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
291
294
|
manifest_name, source_manifest)
|
292
295
|
|
293
296
|
# Set output commit of the build.
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
ref=revisions.get(main_repo_path) or '',
|
302
|
-
id=git_checkout['revision'],
|
297
|
+
if set_output_commit:
|
298
|
+
# As of April 2019, got_revision describes the output commit,
|
299
|
+
# the same commit that Build.output.gitiles_commit describes.
|
300
|
+
# In particular, users tend to set got_revision to make Milo display
|
301
|
+
# it. Derive output commit from got_revision.
|
302
|
+
out_commit = common_pb2.GitilesCommit(
|
303
|
+
id=self._last_returned_properties['got_revision'],
|
303
304
|
)
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
305
|
+
|
306
|
+
out_solution = reverse_rev_map['got_revision']
|
307
|
+
out_manifest = result['manifest'][out_solution]
|
308
|
+
assert out_manifest['revision'] == out_commit.id, (
|
309
|
+
out_manifest, out_commit.id)
|
310
|
+
|
311
|
+
out_commit.host, out_commit.project = (
|
312
|
+
self.m.gitiles.parse_repo_url(out_manifest['repository'])
|
313
|
+
)
|
314
|
+
|
315
|
+
# Determine the output ref.
|
316
|
+
got_revision_cp = self._last_returned_properties.get('got_revision_cp')
|
317
|
+
in_rev = revisions.get(out_solution)
|
318
|
+
if got_revision_cp:
|
319
|
+
# If commit position string is available, read the ref from there.
|
320
|
+
out_commit.ref, out_commit.position = (
|
321
|
+
self.m.commit_position.parse(got_revision_cp))
|
322
|
+
elif in_rev.startswith('refs/'):
|
323
|
+
# If we were asked to check out a specific ref, use it as output
|
324
|
+
# ref.
|
325
|
+
out_commit.ref = in_rev
|
326
|
+
elif in_rev == 'HEAD':
|
327
|
+
# bot_update.py interprets HEAD as refs/heads/master
|
328
|
+
out_commit.ref = 'refs/heads/master'
|
329
|
+
elif out_commit.id == in_commit.id and in_commit.ref:
|
330
|
+
# Derive output ref from the input ref.
|
331
|
+
out_commit.ref = in_commit.ref
|
332
|
+
else: # pragma: no cover
|
333
|
+
assert False, (
|
334
|
+
'Unsupposed case. '
|
335
|
+
'Call buildbucket.set_output_gitiles_commit directly.'
|
336
|
+
)
|
337
|
+
self.m.buildbucket.set_output_gitiles_commit(out_commit)
|
318
338
|
|
319
339
|
# Set the "checkout" path for the main solution.
|
320
340
|
# This is used by the Chromium module to figure out where to look for
|
@@ -352,13 +372,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
352
372
|
|
353
373
|
return step_result
|
354
374
|
|
355
|
-
def
|
356
|
-
"""Returns the
|
357
|
-
|
375
|
+
def _destination_ref(self, cfg, path):
|
376
|
+
"""Returns the ref branch of a CL for the matching project if available or
|
377
|
+
HEAD otherwise.
|
358
378
|
|
359
379
|
If there's no Gerrit CL associated with the run, returns 'HEAD'.
|
360
|
-
Otherwise this queries Gerrit for the correct destination
|
361
|
-
might differ from master.
|
380
|
+
Otherwise this queries Gerrit for the correct destination ref, which
|
381
|
+
might differ from refs/heads/master.
|
362
382
|
|
363
383
|
Args:
|
364
384
|
cfg: The used gclient config.
|
@@ -366,11 +386,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
366
386
|
'src/v8'. The query will only be made for the project that matches
|
367
387
|
the CL's project.
|
368
388
|
Returns:
|
369
|
-
A destination
|
370
|
-
and if different from master, returns 'HEAD' otherwise.
|
389
|
+
A destination ref as understood by bot_update.py if available
|
390
|
+
and if different from refs/heads/master, returns 'HEAD' otherwise.
|
371
391
|
"""
|
372
392
|
# Ignore project paths other than the one belonging to the current CL.
|
373
393
|
patch_path = self.m.gclient.get_gerrit_patch_root(gclient_config=cfg)
|
394
|
+
if patch_path:
|
395
|
+
patch_path = patch_path.replace(self.m.path.sep, '/')
|
374
396
|
if not patch_path or path != patch_path:
|
375
397
|
return 'HEAD'
|
376
398
|
|
@@ -378,13 +400,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
|
378
400
|
if target_ref == 'refs/heads/master':
|
379
401
|
return 'HEAD'
|
380
402
|
|
381
|
-
|
382
|
-
ret = target_ref
|
383
|
-
prefix = 'refs/heads/'
|
384
|
-
if ret.startswith(prefix):
|
385
|
-
ret = ret[len(prefix):]
|
386
|
-
|
387
|
-
return ret
|
403
|
+
return target_ref
|
388
404
|
|
389
405
|
def _resolve_fixed_revisions(self, bot_update_json):
|
390
406
|
"""Set all fixed revisions from the first sync to their respective
|
@@ -95,6 +95,13 @@
|
|
95
95
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
96
96
|
]
|
97
97
|
},
|
98
|
+
{
|
99
|
+
"cmd": [],
|
100
|
+
"name": "set_output_gitiles_commit",
|
101
|
+
"~followup_annotations": [
|
102
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
103
|
+
]
|
104
|
+
},
|
98
105
|
{
|
99
106
|
"jsonResult": null,
|
100
107
|
"name": "$result"
|
data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json
CHANGED
@@ -95,6 +95,13 @@
|
|
95
95
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
96
96
|
]
|
97
97
|
},
|
98
|
+
{
|
99
|
+
"cmd": [],
|
100
|
+
"name": "set_output_gitiles_commit",
|
101
|
+
"~followup_annotations": [
|
102
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
103
|
+
]
|
104
|
+
},
|
98
105
|
{
|
99
106
|
"jsonResult": null,
|
100
107
|
"name": "$result"
|
@@ -96,6 +96,13 @@
|
|
96
96
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
97
97
|
]
|
98
98
|
},
|
99
|
+
{
|
100
|
+
"cmd": [],
|
101
|
+
"name": "set_output_gitiles_commit",
|
102
|
+
"~followup_annotations": [
|
103
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
104
|
+
]
|
105
|
+
},
|
99
106
|
{
|
100
107
|
"jsonResult": null,
|
101
108
|
"name": "$result"
|
data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/clobber.json
CHANGED
@@ -96,6 +96,13 @@
|
|
96
96
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
97
97
|
]
|
98
98
|
},
|
99
|
+
{
|
100
|
+
"cmd": [],
|
101
|
+
"name": "set_output_gitiles_commit",
|
102
|
+
"~followup_annotations": [
|
103
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
104
|
+
]
|
105
|
+
},
|
99
106
|
{
|
100
107
|
"cmd": [
|
101
108
|
"python",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"--output_json",
|
57
57
|
"/path/to/tmp/json",
|
58
58
|
"--patch_ref",
|
59
|
-
"https://chromium.googlesource.com/chromium/src@refs/changes/56/123456/7",
|
59
|
+
"https://chromium.googlesource.com/chromium/src@refs/heads/master:refs/changes/56/123456/7",
|
60
60
|
"--revision",
|
61
61
|
"src@HEAD",
|
62
62
|
"--disable-syntax-validation"
|
@@ -96,6 +96,13 @@
|
|
96
96
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
97
97
|
]
|
98
98
|
},
|
99
|
+
{
|
100
|
+
"cmd": [],
|
101
|
+
"name": "set_output_gitiles_commit",
|
102
|
+
"~followup_annotations": [
|
103
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
104
|
+
]
|
105
|
+
},
|
99
106
|
{
|
100
107
|
"cmd": [
|
101
108
|
"python",
|
@@ -96,6 +96,13 @@
|
|
96
96
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
97
97
|
]
|
98
98
|
},
|
99
|
+
{
|
100
|
+
"cmd": [],
|
101
|
+
"name": "set_output_gitiles_commit",
|
102
|
+
"~followup_annotations": [
|
103
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
104
|
+
]
|
105
|
+
},
|
99
106
|
{
|
100
107
|
"cmd": [
|
101
108
|
"python",
|
@@ -95,6 +95,13 @@
|
|
95
95
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
96
96
|
]
|
97
97
|
},
|
98
|
+
{
|
99
|
+
"cmd": [],
|
100
|
+
"name": "set_output_gitiles_commit",
|
101
|
+
"~followup_annotations": [
|
102
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
103
|
+
]
|
104
|
+
},
|
98
105
|
{
|
99
106
|
"cmd": [
|
100
107
|
"python",
|
@@ -99,6 +99,13 @@
|
|
99
99
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
100
100
|
]
|
101
101
|
},
|
102
|
+
{
|
103
|
+
"cmd": [],
|
104
|
+
"name": "set_output_gitiles_commit",
|
105
|
+
"~followup_annotations": [
|
106
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
107
|
+
]
|
108
|
+
},
|
102
109
|
{
|
103
110
|
"cmd": [
|
104
111
|
"python",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"--output_json",
|
57
57
|
"/path/to/tmp/json",
|
58
58
|
"--patch_ref",
|
59
|
-
"https://chromium.googlesource.com/angle/angle@refs/changes/56/123456/7",
|
59
|
+
"https://chromium.googlesource.com/angle/angle@refs/heads/master:refs/changes/56/123456/7",
|
60
60
|
"--revision",
|
61
61
|
"src@HEAD",
|
62
62
|
"--revision",
|
@@ -141,6 +141,13 @@
|
|
141
141
|
"@@@SET_BUILD_PROPERTY@got_v8_revision_cp@\"refs/heads/master@{#43426}\"@@@"
|
142
142
|
]
|
143
143
|
},
|
144
|
+
{
|
145
|
+
"cmd": [],
|
146
|
+
"name": "set_output_gitiles_commit",
|
147
|
+
"~followup_annotations": [
|
148
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"fake.org\", \"id\": \"f27fede2220bcd326aee3e86ddfd4ebd0fe58cb9\", \"position\": 170242, \"project\": \"src\", \"ref\": \"refs/heads/master\"}@@@"
|
149
|
+
]
|
150
|
+
},
|
144
151
|
{
|
145
152
|
"cmd": [
|
146
153
|
"python",
|
@@ -0,0 +1,57 @@
|
|
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
|
+
"--revision_mapping_file",
|
10
|
+
"{\"got_angle_revision\": \"src/third_party/angle\", \"got_cr_revision\": \"src\", \"got_revision\": \"src\", \"got_v8_revision\": \"src/v8\"}",
|
11
|
+
"--git-cache-dir",
|
12
|
+
"[GIT_CACHE]",
|
13
|
+
"--cleanup-dir",
|
14
|
+
"[CLEANUP]/bot_update",
|
15
|
+
"--output_json",
|
16
|
+
"/path/to/tmp/json",
|
17
|
+
"--revision",
|
18
|
+
"got_revision@src",
|
19
|
+
"--revision",
|
20
|
+
"src@HEAD",
|
21
|
+
"--disable-syntax-validation"
|
22
|
+
],
|
23
|
+
"env_prefixes": {
|
24
|
+
"PATH": [
|
25
|
+
"RECIPE_REPO[depot_tools]"
|
26
|
+
]
|
27
|
+
},
|
28
|
+
"infra_step": true,
|
29
|
+
"name": "bot_update (without patch)",
|
30
|
+
"~followup_annotations": [
|
31
|
+
"@@@STEP_LOG_LINE@json.output@{@@@",
|
32
|
+
"@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
|
33
|
+
"@@@STEP_LOG_LINE@json.output@ \"src\": {@@@",
|
34
|
+
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://chromium.googlesource.com/chromium/src\", @@@",
|
35
|
+
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
|
36
|
+
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
37
|
+
"@@@STEP_LOG_LINE@json.output@ }, @@@",
|
38
|
+
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
|
39
|
+
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
|
40
|
+
"@@@STEP_LOG_LINE@json.output@ }@@@",
|
41
|
+
"@@@STEP_LOG_LINE@json.output@}@@@",
|
42
|
+
"@@@STEP_LOG_END@json.output@@@",
|
43
|
+
"@@@SET_BUILD_PROPERTY@got_revision@\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@"
|
44
|
+
]
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"cmd": [],
|
48
|
+
"name": "set_output_gitiles_commit",
|
49
|
+
"~followup_annotations": [
|
50
|
+
"@@@SET_BUILD_PROPERTY@$recipe_engine/buildbucket/output_gitiles_commit@{\"host\": \"chromium.googlesource.com\", \"id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"project\": \"chromium/src\", \"ref\": \"refs/heads/master\"}@@@"
|
51
|
+
]
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"jsonResult": null,
|
55
|
+
"name": "$result"
|
56
|
+
}
|
57
|
+
]
|