-
Notifications
You must be signed in to change notification settings - Fork 31
Wrong tasks routing - DEFAULT_VERSION_HOSTNAME env variable set to empty string #118
Comments
Thanks for filing this issue. Can you tell me whether your Please note that the beta Managed VMs environment is deprecated in favor of the App Engine Flexible environment, which is GA. And this beta |
It is
It used to be I checked the env variables available both in the container and during processing an HTTP request and |
Speaking more broadly on the topic, we're using the following shims, where we discovered some fluctuations in behavior between the four runtimes - GAE classic, Managed VM
|
We continue to have discussions about how best to detect/communicate the current environment (GCE, GKE, various flavors of GAE, etc) to application code. However, I can point you to the logic our Cloud client libraries use today: And the logic used by the auth client: |
When a task is added from a Flex VM service using the
python-compat
runtime, wrong targetHost
header is being calculated forcing the task to be executed on the same version and the same module, regardless of thetarget
parameter of thetaskqueue.add
method.This seems to be caused by
app_identity.get_default_version_hostname
returning empty string which in turn happens becauseDEFAULT_VERSION_HOSTNAME
environment variable is set to a default empty string and not populated anywhere. I am surprised this is not handled since there is code in thepython-compat
runtime that takes care to initialize the env in a compatible way with GAE. Am I missing something?Workaround for me currently is to monkey-patch
app_identity.get_default_version_hostname
to return the value ofGAE_APPENGINE_HOSTNAME
environment variable which is correctly set on Flex VM whenenable_app_engine_apis: true
flag is set in the YAML descriptor of the service.The text was updated successfully, but these errors were encountered: