Assigned
Status Update
Comments
ya...@gmail.com <ya...@gmail.com> #3
Hi, this error only affects Cloud SDK version 186. It was previously reported in Issue 72407295 and a fix for it should be released in Cloud SDK version 187.
In the mean time, you can downgrade to Cloud SDK version 185 as a workaround by running the following command:
gcloud components update --version 185.0.0
In the mean time, you can downgrade to Cloud SDK version 185 as a workaround by running the following command:
gcloud components update --version 185.0.0
ng...@google.com <ng...@google.com> #4
From what I can tell, there are 3 options available to you to help you identify which handlers validated against a given request path.
1. Check them each manually against the request in the order in which they are defined in your app.yaml. This may be slow but given this is for troubleshooting, it may not be necessary to make a significant change to the dev server. You may find an online tester like this one[0] useful for such a task as it seems to validate POSIX extended regular expressions.
2. Separate your handlers such that each handler is served by a different Python script. With this strategy, you'll know which handler was used by which Python script was run. This may seem unreasonable but may also lead to more modular code.
3. Dig around the devappsever2 code base to make some modifications yourself. This may gain some benefits for all your tests but may also take some time that you may not feel is worthwhile. If going for this, I'd suggest looking at the following files:
<gcloud-sdk-dir>/platform/google_appengine/google/appengine/tools/devappserver2/url_handler.py for the code where paths are validated against URL regular expressions
<gcloud-sdk-dir>/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py for the code where the YAML is loaded and parsed before starting all the module servers. You'd have to find or add some code that passes the URL handler information on to the module.py referenced in my previous comment.
In the meantime, I will forward this feature request to the engineering team. Any questions or concerns they may have will be posted here. Status updates will be posted here as well.
[0]:http://www.regexplanet.com/advanced/golang/index.html
1. Check them each manually against the request in the order in which they are defined in your app.yaml. This may be slow but given this is for troubleshooting, it may not be necessary to make a significant change to the dev server. You may find an online tester like this one[0] useful for such a task as it seems to validate POSIX extended regular expressions.
2. Separate your handlers such that each handler is served by a different Python script. With this strategy, you'll know which handler was used by which Python script was run. This may seem unreasonable but may also lead to more modular code.
3. Dig around the devappsever2 code base to make some modifications yourself. This may gain some benefits for all your tests but may also take some time that you may not feel is worthwhile. If going for this, I'd suggest looking at the following files:
<gcloud-sdk-dir>/platform/google_appengine/google/appengine/tools/devappserver2/url_handler.py for the code where paths are validated against URL regular expressions
<gcloud-sdk-dir>/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py for the code where the YAML is loaded and parsed before starting all the module servers. You'd have to find or add some code that passes the URL handler information on to the module.py referenced in my previous comment.
In the meantime, I will forward this feature request to the engineering team. Any questions or concerns they may have will be posted here. Status updates will be posted here as well.
[0]:
ya...@gmail.com <ya...@gmail.com> #5
Thank you again for the precise informations too.
I just modified the URLHandler's match function and logged the regex pattern when a match occurs. For now this is good for me (already found what i did wrong in app.yaml), but this messes up the log pretty bad. I'm sure you python gurus can do better work if decided to worth the effort.
This python thingy looks promising. Will try to learn more about it.
Can not thank you enough. Eager to hear about what the decision makers are thinking about the feature.
I just modified the URLHandler's match function and logged the regex pattern when a match occurs. For now this is good for me (already found what i did wrong in app.yaml), but this messes up the log pretty bad. I'm sure you python gurus can do better work if decided to worth the effort.
This python thingy looks promising. Will try to learn more about it.
Can not thank you enough. Eager to hear about what the decision makers are thinking about the feature.
ng...@google.com <ng...@google.com> #6
I've added an internal tracking number of ours to this external issue. This request is now in the hands of our engineering team.
As mentioned previously, questions, concerns, and status updates will be posted here. Thanks again for bringing this to our attention.
As mentioned previously, questions, concerns, and status updates will be posted here. Thanks again for bringing this to our attention.
Description
It would be nice if dev_appserver.py would tell me which url handler was matched by the request so i would be closer telling what is wrong with my app.yaml.
What business case or problem would this feature help you to solve?
none (hobby programming / getting to know Google Cloud)
What workarounds or alternatives have you considered? In what way were
these unsuitable for your needs?
now i'll try to see into dev_appserver.py and implement the feature myself, but i will fail as python is very far from me.
What version of the product are you using? On what operating system?
Google Cloud SDK 142.0.0
app-engine-python 1.9.49
beta 2016.01.12
bq 2.0.24
bq-win 2.0.24
core 2017.01.27
core-win 2016.11.07
gcloud
gsutil 4.22
gsutil-win 4.20
powershell 1.0.0.2
windows-ssh-tools 2016.05.13
Please provide any additional information below.