Is there a way to to get my autoscaled application's VersionID in my init()
function without a Context
? The only available option seems to be appengine.VersionID(context.Context)
. Manually scaled instances have /_ah/start
called when they start up (giving access to a Context
), but there is nothing like this for autoscaled instances.
I am not caring about the generated ID that appengine.VersionID
returns with it, just the app.yaml version.
EDIT: A bit of context: I am wanting to deploy versions in the form x-x-x-dev or x-x-x-live and have my database connection depend on the version suffix. This way, when I look in the GCP console, I can be certain which deployed modules/services are using which database. Of course, I setup my DB connection pool in the init()
, which has no access to a Context
.