带有运行时go111 url分配问题的dev_appserver.py

I am still working to get my old style appengines to work under at least go111 (go112 would not work due to dependencies on memcache). I am now stumbling over app.yaml configuration issues with my static files, I used a completely static directory layout before and just specified a few dynamic handlers in the root like this:

runtime: go111

handlers:
- url: /_ah/.*
 script: auto
 login: admin
 secure: always
- url: /dynamic
 script: auto
 secure: always
- url: /admin/.*
 script: auto
 login: admin
 secure: always
- url: (.*)/
 static_files: html\1/index.html
 upload: html/index.html
 secure: always
- url: /(.*\.map)
 mime_type: application/json
 static_files: html/\1
 upload: html/(.*\.map)
 secure: always
- url: /
 static_dir: html
 secure: always

dev_appserver.py will never call my dynamic entry point. In production this does work, but I am still working on the conversion and would like to test locally. Any hints how to convince dev_appserver.py to let me do this? By the way my gcloud tools are updated as of today.

Your question is why your application works well when you deploy it to production but doesn't work when you use dev_appserver.py to run it locally, and how could you run it with dev_appserver.py. The answer to that is:

You won't be able to run it locally properly using dev_appserver.py, since it does not support runtime Go 1.11. Look at the Local Development Server Options documentation, there's only a link for "Go 1.9".

enter image description here

(as you can see, the links for "Go 1.11" and "Go 1.12" are disabled, which translates to: not supported.)

Documentation for Go 1.11 on App Engine Standard states that in order to test your application locally you would have to use "go run" command (notice how it doesn't mention dev_appserver.py tool). The command would be something like this:

go run [build flags] [-exec xprog] package [arguments...]

For more information about the command go here.

I'm sure you might have already read this but, to know more about the migrations process from Go1.9 to Go1.11 read this documentation.

You have stated that "go run" command wouldn't work for your case. So, a workaround for that would be to test your application directly into App Engine but without migrating the traffic.

When deploying your test version use:

gcloud app deploy --no-promote

To access to it go to:

http://VERSION_ID.default.YOUR_PROJECT_ID.appspot.com

If everything turned out great, you can migrate the traffic on the Cloud Console UI selecting the version you just deployed and clicking "Migrate traffic".