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

No instances for a --no-promote dev version of app engine application

I have an app engine application which has been running fine for years. I never used to mess with the version of it and always deployed the same version (probably not a great idea). In order to sandbox some changes which I really need to test before pushing to production I spun up a second version of my application: gcloud app deploy --version dev --no-promote --project=myProjectName
 
The problem is that even after waiting an hour when I go into the app engine console I see my dev version with 0 running instances. Running gcloud app versions list doesn't even mention the dev version.
 
Does anyone have any idea what is going on here? I have not yet changed anything from my prod version, I am just attempting to deploy to a new version name to verify this works before applying changes and despite this no-op I get zero instances but also zero errors. The main prod version is still happily doing its thing and never shows signs of a problem when I deploy a new prod version.
 
 
This is the app.yaml if anyone cares:
runtime: python38
instance_class: B4
basic_scaling:
max_instances: 2
idle_timeout: 8m
 
0 3 573
3 REPLIES 3

Running gcloud app versions list doesn't even mention the dev version

This suggests there was an error during the deployment.

Try this - go to console, delete the version and re-deploy again. Confirm from the deploy logs that it successfully deployed the version and updated the service. If everything checks out, open the url for this new (dev) version and see if you get an error.

 

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

Ok so I deleted that version, and redeployed to "newdev" which is a name I have never used before. Still nothing. What I could find was in the logs for the new version name I found

The request failed because the instance could not start successfully. Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404.

That sounds promising except... I got no errors from gcloud while deploying and that is *the only* thing in the logs which suggests a problem. Everything else is "worker is starting up", "you have no favicon", "working is shutting down", etc. 

I know I'm sounding vague here but do you have any other suggestions for where to dig or anything else which could prevent the instance from running?

The request failed because the instance could not start successfully.

You've narrowed down the issue (GAE can't start your code).

1) Can you try running your App on your dev machine using dev_appserver.py and see if it raises errors for you?.  You have to use dev_appserver.py to have a close fit (not an exact match) for what GAE production will do. 

2) If no errors above, check your logs again (on GAE production) and look for entries as it tries to install your requirements to see if any of them failed.

3) Finally, is what you have in your question the full contents of your app.yaml file? If it isn't, include the full contents of your app.yaml file so that we can see if there's an issue there (for example if you have an entrypoint in your app.yaml file which uses gunicorn, then you must have gunicorn in your requirements.txt file else your code won't run)

 

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