config_lib: Create method to clear cached SiteConfig.
Add a method to config_lib to clear the SiteConfig cache, and call it
after we update site config contents.
Clearing the cache isn't 100% safe, since the Chrome OS config, or an
outdated config was availble to any code that ran before we
cleared (including on import), and that code might have used or saved
off assorted values.
But this should be good enough to keep our bootstrap working.
BUG=chromium:530334
TEST=cbuildbot/run_tests (and new tests)
Change-Id: I3087ca1a3764f26b5b4bd7a04386cb4612afb08a
Reviewed-on: https://chromium-review.googlesource.com/298952
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Dan Albert <danalbert@google.com>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index f08e3d2..c1c2dab 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -1050,6 +1050,8 @@
if branch_name:
git.RunGit(constants.SITE_CONFIG_DIR, ['checkout', branch_name])
+ # Clear the cached SiteConfig, if there was one.
+ config_lib.ClearConfigCache()
# TODO(build): This function is too damn long.
def main(argv):