Add explicit path for infra_internal in infra_internal_superproject gclient config.

Fixes this error:
http://shortn/_MMjWQ6UDNN

presubmit.execute() (http://shortn/_IqUEskOvZy) calls get_project_revision_properties (http://shortn/_2YWZfKEBWb).
the `project_name` passed in was '.' (the solution root) so get_project_revision_properties was returning nothing.

setting 'infra_internal' in repo_path_map leads to this code (http://shortn/_7cO431MLDm) setting `self._relative_root` to `infra_internal` as expected. So `project_name` above will be `infra_internal` not '.'

In this case, also seems to fix the empty commit patch issue, as the `git commit` gets executed in infra_internal now.

led run: http://shortn/_UM6iapZUkx

Bug: 1415507
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Change-Id: Ib457ded91ffe5b9041b8b1bb0345229bfd07d1f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4545587
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
changes/87/4545587/10
Joanna Wang 2 years ago committed by LUCI CQ
parent b0e8e7adbc
commit 9c32c9240c

@ -758,7 +758,7 @@ Raises:
Returns a presubmit step.
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#102)(self, bot_update_step, skip_owners=False, run_all=False):**
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#101)(self, bot_update_step, skip_owners=False, run_all=False):**
Runs presubmit and sets summary markdown if applicable.

@ -312,6 +312,10 @@ def infra_internal_superproject(c):
soln.custom_vars = {'checkout_internal': True}
soln.url = 'https://chromium.googlesource.com/infra/infra_superproject.git'
c.got_revision_mapping['infra_internal'] = 'got_revision'
c.repo_path_map.update({
'https://chrome-internal.googlesource.com/infra/infra_internal':
('infra_internal', None)
})
@config_ctx()

@ -86,7 +86,6 @@ class PresubmitApi(recipe_api.RecipeApi):
'-c',
'user.name=The Commit Bot',
'commit',
'--allow-empty',
'-a',
'-m',
'Committed patch',

Loading…
Cancel
Save