[After digging into the problem, it seems the issue is not about the routing but about the use of endpoints in modules. New question at GAE Modules and Google Endpoints
I'm migrating an GAE application to modules, and I'm confused about the routing, as some queries are correctly routed, but not all of them.
I have the following dispatch.yaml in my root folder. Note that that api module is using the Google Cloud Enpoints API
application: testapp
dispatch:
- url: "*/foo/*"
module: foomodule
- url: "*/_ah/spi/*"
module: api
- url: "testapp.appspot.com/"
module: default
And then one folder by module name, each with a yaml file, defining the URL patterns with handlers, e.g. /www/www.yaml for my default module
application: testapp
version: alpha
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /static
static_dir: static
- url: /.*
script: www.app
libraries:
- name: webapp2
version: latest
Queries such as http://testapp.appspot.com/xxx are correctly redirected to default, /foo/xxx ones are handled by the foomodule, but API requests (/_ah/spi/xxx) are going to the default module with a 404.
However, I can see a 200 OK for /_ah/spi/BackendService.logMessages in the logs of the instance mapped to the api module. This one comes from alpha-dot-api-dot-testapp.appspot.com - while the 404 are from testapp.appspot.com only. (NB: I'd like to make my queries work from testapp.appspot.com)
Is there something I am doing wrong? Also, is there a way to list the configuration currently used on the server to make sure it's correctly deployed?
- url: /_ah/spi/handler in your api yaml file? - GAEfanappcfg.py update dispatch.yaml www.yaml api.yaml foo.yaml? And, in api.yaml, does it havemodule: api? Do you have any open instances running on the api module? If so, they have have stale code - kill them and try again. - GAEfan