I am unable to deploy my App Engine Flex Python project with split health checks.
I have enabled health checks:
$ gcloud beta app describe
...
featureSettings:
splitHealthChecks: true
Using the docs as a model, my app.yaml has:
readiness_check:
path: '/health_check'
check_interval_sec: 5
timeout_sec: 4
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 600
liveness_check:
path: '/health_check'
check_interval_sec: 30
timeout_sec: 4
failure_threshold: 2
success_threshold: 2
But when I deploy, it fails due to the following error:
File "/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
worker.init_process()
File "/env/local/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 109, in init_process
super(ThreadWorker, self).init_process()
File "/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
self.load_wsgi()
File "/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
self.wsgi = self.app.wsgi()
File "/env/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/env/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/env/local/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
__import__(module)
File "/env/local/lib/python2.7/site-packages/vmruntime/wsgi.py", line 48, in <module>
wsgi_config.get_module_config_filename())
File "/env/local/lib/python2.7/site-packages/vmruntime/wsgi_config.py", line 48, in get_module_config
return appinfo_includes.Parse(f)
File "/env/local/lib/python2.7/site-packages/google/appengine/api/appinfo_includes.py", line 57, in Parse
appyaml, _ = ParseAndReturnIncludePaths(appinfo_file, open_fn)
File "/env/local/lib/python2.7/site-packages/google/appengine/api/appinfo_includes.py", line 82, in ParseAndReturnIncludePaths
appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
File "/env/local/lib/python2.7/site-packages/google/appengine/api/appinfo.py", line 2417, in LoadSingleAppInfo
listener.Parse(app_info)
File "/env/local/lib/python2.7/site-packages/google/appengine/api/yaml_listener.py", line 227, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "/env/local/lib/python2.7/site-packages/google/appengine/api/yaml_listener.py", line 178, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
EventError: Unexpected attribute 'failure_threshold' for object of type ReadinessCheck.
I'm following the documentation so I'm not sure why it would be triggering an error here.
The only thing I can imagine is that my 'site-packages' is perhaps out of date? I don't believe my Docker should install any google/appengine/
libraries, but I'm at a loss for what I could be doing wrong.