Skip to content

fix(memorystore): update redis GKE Dockerfile and App Engine runtime to supported Python - #14758

Open
TheRealDanii wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
TheRealDanii:fix-memorystore-redis-runtimes
Open

TheRealDanii wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
TheRealDanii:fix-memorystore-redis-runtimes

Conversation

@TheRealDanii

@TheRealDanii TheRealDanii commented Nov 4, 2026 •

Copy link
Copy Markdown

Description

memorystore/redis/requirements.txt now 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/Dockerfile builds on the deprecated gcr.io/google_appengine/python image and creates a python3.4 virtualenv, so Flask is never installed.
  • gae_standard_deployment/app.yaml uses runtime: python37, which is deprecated on App Engine and can't install the pinned Flask.

Changes:

  • The GKE Dockerfile now uses python:3.14-slim, the same base image as cloud_run_deployment/Dockerfile. It keeps the REDISHOST/REDISPORT defaults and the same gunicorn -b 0.0.0.0:8080 main:app command that visit-counter.yaml expects.
  • app.yaml: python37 → python314, matching the python:3.14-slim image in the GKE Dockerfile.

How I tested (locally with podman, not on a live environment):

  • podman build -f gke_deployment/Dockerfile . from memorystore/redis succeeds
  • podman run --rm <img> python -c "import flask, redis, gunicorn, main" works
  • With the default CMD, gunicorn boots and listens on 0.0.0.0:8080
  • I did not deploy the App Engine change

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@TheRealDanii
TheRealDanii requested review from a team as code owners November 4, 2026 12:27
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: memorystore labels Nov 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Google App Engine standard environment does not currently support the python313 runtime. The latest supported Python runtime is python312. Please use python312 to avoid deployment failures.

runtime: python312

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: memorystore samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant