dev_appserver in 1.9.76 switched import resolution from relative to absolute?

74 views
Skip to first unread message

Ryan B

unread,
Oct 10, 2018, 6:50:02 PM10/10/18
to Google App Engine
hi all! i'm debugging a dev_appserver problem that seems to have been introduced in google cloud sdk 219 / app-engine-python 1.9.76: imports are now all resolved as absolute instead of relative. does that sound familiar?

for example, i use the future library in many of my apps, which has this line of code:

    import test

on gcloud sdk 218 / app-engine-python 1.9.75 and before, this worked fine. it resolved the import relative to the containing source file, in local/lib/python2.7/site-packages/future/... , a virtualenv, which i set up with vendor. on 1.9.76, it changed to resolving absolute instead, so it imports an unrelated test/ package directory in the top level of my app, which obviously won't work, and the app breaks.

i couldn't find any mention of this in release notes or docs. was this expected? any recommendations for handling it? thanks in advance!


Ryan B

unread,
Oct 10, 2018, 6:51:57 PM10/10/18
to Google App Engine
fwiw, i've deployed at least one of the affected apps since app-engine-python 1.9.76 was released, and it's still working fine, which implies that the prod runtime isn't similarly affected. (i did that deploy with gcloud sdk 218, purely out of superstition, but i didn't really expect it to matter much one way or the other.)

Amit (Google Cloud Support)

unread,
Oct 11, 2018, 12:31:52 PM10/11/18
to Google App Engine

Hello Ryan


What is the current Google Cloud SDK version you are using? As of now current version for Google Cloud SDK is [220.0.0]. We had a known issue [1] on version [219.0.1] in dev_appserver with app-engine-python [1.9.76] which should be resolved in the current version where the version of app-engine-python is [1.9.77]. I would recommend to update your SDK version using this [2] command and try again. If you still having this issue after upgrade and believe this could be a bug, please create an issue in issuetracker with details description of your issue and provide the output of this [3] command so that we know more about your SDK.    


[1] https://issuetracker.google.com/117145272

[2] gcloud components update

[3] gcloud info --anonymize


Ryan B

unread,
Oct 11, 2018, 12:57:20 PM10/11/18
to Google App Engine
thanks for the link, amit! that issue definitely looks related. this problem still happens for me on cloud SDK 220 + app-engine-python 1.9.77, so i may be seeing a different variation of that issue, since most people there say 220 fixed it for them. i've added a comment.

Vitaly Bogomolov

unread,
Oct 12, 2018, 1:12:21 AM10/12/18
to Google App Engine

hi all! i'm debugging a dev_appserver problem that seems to have been introduced in google cloud sdk 219 / app-engine-python 1.9.76: imports are now all resolved as absolute instead of relative. does that sound familiar?


Same issue. Some days ago I was update Cloud SDK to latest version, but this update break my test suite (import errors)

I did not investigate the causes, but simply rolled back to the previous version, which works as usual.

Google Cloud SDK 207.0.0
app-engine-python 1.9.71
beta 2018.06.22
bq 2.0.34
cloud-datastore-emulator 2.0.0
core 2018.06.22
gsutil 4.32


WBR, Vitaly.

sami...@google.com

unread,
Oct 12, 2018, 3:42:27 PM10/12/18
to Google App Engine

Hi Vitaly,


This behavior is indeed unusual. As Amit mentioned above, there seems to be a known issue which is currently under investigation by our Cloud SDK Engineering Team. I would recommend adding a comment to the Issue Thread providing your scenario and CC’ing yourself for any future updates on the post.

Vitaly Bogomolov

unread,
Oct 12, 2018, 4:57:49 PM10/12/18
to Google App Engine
 

This behavior is indeed unusual. As Amit mentioned above, there seems to be a known issue which is currently under investigation by our Cloud SDK Engineering Team. I would recommend adding a comment to the Issue Thread providing your scenario and CC’ing yourself for any future updates on the post.


Now I just don’t have time to investigate (project deadline)

At the end of next week, I will try to reproduce the error and provide detailed information about the context.

WBR, Vitaly.

P.S.
I'm really very grateful to the Cloud SDK team for the opportunity to roll back the version to previous.

Katayoon (Cloud Platform Support)

unread,
Oct 15, 2018, 9:59:00 AM10/15/18
to Google App Engine
As mentioned in Issue 117145272#comment24, the issue should have been fixed with Cloud SDK 220. 

- Note that you can restore the Cloud SDK installation to its previous state by running the "gcloud components restore" command.





Reply all
Reply to author
Forward
0 new messages