GAE will not update the deployed code through gcloud. For instance, I created this method:
main.py
@app.route('/test',methods=['GET'])
def test():
print 'print test'
return 'test'
app.yaml
runtime: python27
api_version: 1
threadsafe: true
runtime_config:
python_version: 2
instance_class: F2
handlers:
- url: /.*
script: main.app
libraries:
- name: flask
version: 0.12
deploy the app:
gcloud app deploy app.yaml queue.yaml --project $PROJECT
Then I get a 404 when visiting /test
.
I tracked down the log error:
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
I looked at this article, which noted that I shouldn't be getting the error every time I visit the URL. I do.
I added --verbosity=info
to my deployment and everything looked great except:
INFO: Could not find any remote repositories associated with [path-to-app]. Cloud diagnostic tools may not be able to display the correct source code for this deployment.
The code appeared updated in the dedugger, which is strange. The latest version is 100% deployed in the App Engine Dashboard.
This is really confusing because on deployment, there isn't a repo, but the code appears in the debugger but the end point won't function because there aren't enough resources.
There seems to be a lot happening here and not sure what the issue is.
Update
Some posts recommend a warmup. I followed the guidelines here and still, no dice. I'm getting a 404 when visiting /test
and /_ah/warmup
.