Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Older Django App Engine site still using 2.7 not loading deployed python files

I'm in the process of researching what needs to be done to migrate a site from Python 2.7, but in the mean time I am still needing to make updates to the current site.

It's been live for several years using a Standard App Engine setup connected to Cloud SQL. I made a change a couple of weeks ago and it seemed to be fine then.

Yesterday, I tried updating the site again to add a new url to urls.py pointing to a new view. Also made some simple html changes to a current template file. I used gcloud app deploy CLI to update it as usual.

After it was done, the new html changes are live on the site, but none of the python changes were there. Like none of those changes were included, just running the python pieces as it was before I deployed. I've even deleted every other version but the currently running one that should have the updates. 

Been checking all of the logs and haven't seen anything. Checked the source code and it was updated to staging. Cloud Build shows no issues. I've even tried removing old urls from the urls.py and those pages are still showing up after a deploy.

When I make another change to any python files, gcloud app deploy does say it is updating 1 file, so it is sending the new changes.

Is there another way to see what happens when the new version goes live? Like if the server isn't restarting or something? The python looks to be serving previous code like some server aspect needs to be restarted to include the python changes.

Any ideas? Been pulling my hair out on this.

 

Solved Solved
0 3 227
1 ACCEPTED SOLUTION

I decided to completely empty the staging and artifact buckets. The code is now showing. Not sure why that would have caused this, but it's working now.

View solution in original post

3 REPLIES 3

1. Confirm the changes to your python code were actually deployed by viewing the source files directly. Navigate to https://console.cloud.google.com/debug?project=<project_id>

2. Take a look at any routing rules you might have in your app.yaml and confirm it isn't affecting your design

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

I had checked Debug and the files were there. The app.yaml hadn't changed from before so that wasn't it. Thanks for offering though.

I decided to completely empty the staging and artifact buckets. The code is now showing. Not sure why that would have caused this, but it's working now.