I've got an app running in App Engine's Java 11 standard environment, where I want to make sure that Tasks are called on a particular version of the app (the one creating them). I can add the AppEngineRouting
field to the task creation request to achieve this, but there's a catch: normally, the version ID is accessible using ApiProxy.getCurrentEnvironment().getVersionId()
, or at least it used to be under the venerable Java 8 standard environment. Under Java 11, ApiProxy.getCurrentEnvironment()
is consistently null
for me.
Am I missing something, or has ApiProxy
been secretly "deprecated" for Java 11 standard? And if so, what is the currently accepted method of getting info like app, version and service IDs, or milliseconds remaining before request deadline?