Merge branch 'main' into avm99963-monorail

Merged commit cd4b3b336f1f14afa02990fdc2eec5d9467a827e

GitOrigin-RevId: e67bbf185d5538e1472bb42e0abb2a141f88bac1
diff --git a/services/client_config_svc.py b/services/client_config_svc.py
index c0acf03..ce85a95 100644
--- a/services/client_config_svc.py
+++ b/services/client_config_svc.py
@@ -12,7 +12,7 @@
 import logging
 import os
 import time
-import urllib
+from six.moves import urllib
 import webapp2
 
 from google.appengine.api import app_identity
@@ -46,6 +46,7 @@
 
 
 # Note: The cron job must have hit the servlet before this will work.
+# when convert to flask replace the webapp2.RequestHandler to Object
 class LoadApiClientConfigs(webapp2.RequestHandler):
 
   config_loads = ts_mon.CounterMetric(
@@ -117,6 +118,36 @@
 
     return content_text
 
+  # def GetLoadApiClientConfigs(self):
+  #   global service_account_map
+  #   global qpm_dict
+  #   authorization_token, _ = app_identity.get_access_token(
+  #     framework_constants.OAUTH_SCOPE)
+  #   response = urlfetch.fetch(
+  #     LUCI_CONFIG_URL,
+  #     method=urlfetch.GET,
+  #     follow_redirects=False,
+  #     headers={'Content-Type': 'application/json; charset=UTF-8',
+  #             'Authorization': 'Bearer ' + authorization_token})
+
+  #   if response.status_code != 200:
+  #    logging.error('Invalid response from luci-config: %r', response)
+  #    self.config_loads.increment({'success': False, 'type': 'luci-cfg-error'})
+  #    flask.abort(500, 'Invalid response from luci-config')
+
+  #   try:
+  #     content_text = self._process_response(response)
+  #   except Exception as e:
+  #     flask.abort(500, str(e))
+
+  #   logging.info('luci-config content decoded: %r.', content_text)
+  #   configs = ClientConfig(configs=content_text,
+  #                           key_name='api_client_configs')
+  #   configs.put()
+  #   service_account_map = None
+  #   qpm_dict = None
+  #   self.config_loads.increment({'success': True, 'type': 'success'})
+
 
 class ClientConfigService(object):
   """The persistence layer for client config data."""