Commit da6894f7 authored by Stephanie Kim's avatar Stephanie Kim Committed by LUCI CQ

Add enforce_fetch to ensure_checkout cmd arg

The enforce_fetch kwarg was being ignored. This change adds the
--enforce_fetch to the resources/bot_update cmd.
Confirmed here through led: https://logs.chromium.org/logs/chromium/led/kimstephanie_google.com/b852fa5e4bd75b11d2dfd35bb66caa5147698ad1b77d6fb2aa69ec87ee57b5d2/+/steps/bot_update/0/logs/execution_details/0

Bug: 1129235
Change-Id: I78c5d62841fda6dafbb709301e26c5047df2d58d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2444114Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
parent 69e30b23
......@@ -58,7 +58,7 @@ Recipe module to ensure a checkout is consistent on a bot.
Wrapper for easy calling of bot_update.
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#522)(self, bot_update_step):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#524)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
......@@ -91,7 +91,7 @@ Args:
enforce_fetch: Enforce a new fetch to refresh the git cache, even if the
solution revision passed in already exists in the current git cache.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#499)(self, project_name, gclient_config=None):**
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#501)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of
a given project.
......@@ -109,7 +109,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#44)(self):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#449)(self, bot_update_json, name):**
&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#451)(self, bot_update_json, name):**
Set a fixed revision for a single dependency using project revision
properties.
......
......@@ -276,6 +276,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
cmd.append('--with_tags')
if gerrit_no_reset:
cmd.append('--gerrit_no_reset')
if enforce_fetch:
cmd.append('--enforce_fetch')
if no_fetch_tags:
cmd.append('--no_fetch_tags')
if gerrit_no_rebase_patch_ref:
......
......@@ -992,6 +992,7 @@ def parse_args():
'there are many tags.'))
parse.add_option(
'--enforce_fetch',
action='store_true',
help=('Enforce a new fetch to refresh the git cache, even if the '
'solution revision passed in already exists in the current '
'git cache.'))
......
......@@ -14,7 +14,7 @@ DEPS = [
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
api.bot_update.ensure_checkout(no_fetch_tags=True)
api.bot_update.ensure_checkout(no_fetch_tags=True, enforce_fetch=True)
def GenTests(api):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment