Repository navigation
fix(memorystore): update redis GKE Dockerfile and App Engine runtime to supported Python - #14758
TheRealDanii wants to merge 2 commits into
Conversation
…to supported Python
There was a problem hiding this comment.
Code Review
This pull request updates the Python runtime environments for both the Google App Engine standard deployment and the GKE deployment. Specifically, it updates the App Engine runtime to Python 3.13 and modernizes the GKE Dockerfile to use a lightweight Python 3.14 image with optimized build steps. However, the App Engine standard environment does not currently support Python 3.13; it is recommended to downgrade this to Python 3.12 to prevent deployment failures.
| # limitations under the License. | ||
| # [START memorystore_app_yaml_standard] | ||
| runtime: python37 | ||
| runtime: python313 |
There was a problem hiding this comment.
python313 is GA on App Engine standard (supported until 2029-10-10, see https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule#python). Switched to python314 anyway to match the python:3.14-slim image used in the GKE Dockerfile.
Description
memorystore/redis/requirements.txtnow needs Python 3.9 or newer (Flask 3.1.3, Werkzeug 3.1.9), but two of the deployment configs still target old runtimes:gke_deployment/Dockerfilebuilds on the deprecatedgcr.io/google_appengine/pythonimage and creates apython3.4virtualenv, so Flask is never installed.gae_standard_deployment/app.yamlusesruntime: python37, which is deprecated on App Engine and can't install the pinned Flask.Changes:
python:3.14-slim, the same base image ascloud_run_deployment/Dockerfile. It keeps theREDISHOST/REDISPORTdefaults and the samegunicorn -b 0.0.0.0:8080 main:appcommand thatvisit-counter.yamlexpects.app.yaml:python37→python314, matching thepython:3.14-slimimage in the GKE Dockerfile.How I tested (locally with podman, not on a live environment):
podman build -f gke_deployment/Dockerfile .frommemorystore/redissucceedspodman run --rm <img> python -c "import flask, redis, gunicorn, main"works0.0.0.0:8080Checklist
Testing
Compliance & Style
Post-Approval Actions