Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Wrong tasks routing - DEFAULT_VERSION_HOSTNAME env variable set to empty string #118

@ntassev

Description

@ntassev

When a task is added from a Flex VM service using the python-compat runtime, wrong target Host header is being calculated forcing the task to be executed on the same version and the same module, regardless of the target parameter of the taskqueue.add method.

This seems to be caused by app_identity.get_default_version_hostname returning empty string which in turn happens because DEFAULT_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 the python-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 of GAE_APPENGINE_HOSTNAME environment variable which is correctly set on Flex VM when enable_app_engine_apis: true flag is set in the YAML descriptor of the service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions