Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: appengine/components/components/config/common.py

Issue 2243923002: Refactors GCE backend config updates. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/components/components/config/common_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/components/components/config/common.py
diff --git a/appengine/components/components/config/common.py b/appengine/components/components/config/common.py
index 6a9448971997e2b22eac31e2111ea532d5e657e8..48c23e5ed98ff2cdca757949d5f311dc30d46a00 100644
--- a/appengine/components/components/config/common.py
+++ b/appengine/components/components/config/common.py
@@ -106,9 +106,14 @@ def _convert_config(content, dest_type):
# Rest
+def _trim_app_id(app_id):
+ """Returns the App ID with the domain prefix removed, if present."""
+ return app_id.split(':')[-1]
+
+
@utils.cache
def self_config_set():
- return 'services/%s' % app_identity.get_application_id()
+ return 'services/%s' % _trim_app_id(app_identity.get_application_id())
def config_service_hostname():
« no previous file with comments | « no previous file | appengine/components/components/config/common_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698