Shadow config for xbuddy.
Add the capability to customize some xBuddy settings via a shadow
configuration file, shadow_xbuddy_config.ini
- Path rewrite aliases
- xBuddy capacity
- Whether or not xBuddy manages src/build/images
Also
- Restructure the existing rewrite lookup table into an ini file
- Have devserver's autoupdate module also use the default board in
src/scripts/.default_board
BUG=chromium:271799
BUG=chromium:260473
TEST=manual
- Checked the lookup table contents with presence/absence of shadow
file, with overrides and additions to the base lookup file.
- Checked that the default board is used by both XBuddy and Updater
modules.
- Pinged server for its xbuddy capacity.
- Pinged server using aliases: '', 'stable_update', and 'release'.
TEST=trybot on mario-paladin
Change-Id: I2cd6f9fda41a878da024deb7936da0c23355c351
Reviewed-on: https://gerrit.chromium.org/gerrit/65780
Reviewed-by: Joy Chen <joychen@chromium.org>
Tested-by: Joy Chen <joychen@chromium.org>
Commit-Queue: Joy Chen <joychen@chromium.org>
diff --git a/gsutil_util.py b/gsutil_util.py
index a6e2324..22d3fe5 100644
--- a/gsutil_util.py
+++ b/gsutil_util.py
@@ -163,7 +163,7 @@
return None
-def GetLatestVersionFromGSDir(gsutil_dir):
+def GetLatestVersionFromGSDir(gsutil_dir, with_release=True):
"""Returns most recent version number found in a GS directory.
This lists out the contents of the given GS bucket or regex to GS buckets,
@@ -173,8 +173,12 @@
msg = 'Failed to find most recent builds at %s' % gsutil_dir
dir_names = [p.split('/')[-2] for p in GSUtilRun(cmd, msg).splitlines()]
try:
- versions = filter(lambda x: re.match(devserver_constants.VERSION_RE, x),
- dir_names)
+ if with_release:
+ versions = filter(lambda x: re.match(devserver_constants.VERSION_RE, x),
+ dir_names)
+ else:
+ versions = filter(lambda x: re.match(devserver_constants.VERSION, x),
+ dir_names)
latest_version = max(versions, key=distutils.version.LooseVersion)
except ValueError:
raise GSUtilError(msg)