From 34e8bd5e5bce0f66131a94ea646204427d232725 Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Tue, 17 Feb 2026 13:25:33 +1100 Subject: [PATCH 1/4] fix(run/django): update bucket permissions, testing Carry over from #13742 --- run/django/mysite/settings.py | 16 +++++++++++++++- run/django/noxfile_config.py | 2 +- run/django/requirements.txt | 5 ++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/run/django/mysite/settings.py b/run/django/mysite/settings.py index a57c07ede72..b04b1537a34 100644 --- a/run/django/mysite/settings.py +++ b/run/django/mysite/settings.py @@ -174,12 +174,26 @@ STORAGES = { "default": { "BACKEND": "storages.backends.gcloud.GoogleCloudStorage", + "options": { + "bucket_name": GS_BUCKET_NAME, + "querystring_auth": True, # Enable signed URLs + "default_acl": None, # No ACLs required due to uniform level access on your bucket + "expiration": 300, + "iam_sign_blob": True, # Use the IAM Sign Blob API + }, }, "staticfiles": { "BACKEND": "storages.backends.gcloud.GoogleCloudStorage", + "options": { + "bucket_name": GS_BUCKET_NAME, + "querystring_auth": True, # Enable signed URLs + "default_acl": None, # No ACLs required due to uniform level access on your bucket + "expiration": 300, + "iam_sign_blob": True, # Use the IAM Sign Blob API + }, }, } -GS_DEFAULT_ACL = "publicRead" +GS_DEFAULT_ACL = None # [END cloudrun_django_static_config] # Default primary key field type diff --git a/run/django/noxfile_config.py b/run/django/noxfile_config.py index e928b32a2d2..ac71c9368c0 100644 --- a/run/django/noxfile_config.py +++ b/run/django/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.6", "3.7", "3.8"], + "ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"], # Old samples are opted out of enforcing Python type hints # All new samples should feature the "enforce_type_hints": True, diff --git a/run/django/requirements.txt b/run/django/requirements.txt index 92897c3072e..de944d236aa 100644 --- a/run/django/requirements.txt +++ b/run/django/requirements.txt @@ -1,7 +1,6 @@ -Django==5.2.5; python_version >= "3.10" -Django==4.2.24; python_version >= "3.8" and python_version < "3.10" +Django==6.0.2 django-storages[google]==1.14.6 django-environ==0.12.0 -psycopg2-binary==2.9.10 +psycopg2-binary==2.9.11 gunicorn==23.0.0 google-cloud-secret-manager==2.21.1 From 59ba8a07de5e4e64fe4d02802c5ffd1aeaa1e6fa Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Tue, 17 Feb 2026 13:56:02 +1100 Subject: [PATCH 2/4] support 3.14 in buildpacks preview --- run/django/cloudmigrate.yaml | 2 +- run/django/e2e_test_setup.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/run/django/cloudmigrate.yaml b/run/django/cloudmigrate.yaml index 8a6fc01b92b..a3e644566c6 100644 --- a/run/django/cloudmigrate.yaml +++ b/run/django/cloudmigrate.yaml @@ -16,7 +16,7 @@ steps: - id: "Build Container Image" name: gcr.io/k8s-skaffold/pack - args: ["build", "${_IMAGE_NAME}", "--builder=gcr.io/buildpacks/builder"] + args: ["build", "${_IMAGE_NAME}", "--builder=gcr.io/buildpacks/builder:google-24"] - id: "Push Container Image" name: "gcr.io/cloud-builders/docker" diff --git a/run/django/e2e_test_setup.yaml b/run/django/e2e_test_setup.yaml index dac968f03f6..3c99ccccd5a 100644 --- a/run/django/e2e_test_setup.yaml +++ b/run/django/e2e_test_setup.yaml @@ -70,7 +70,7 @@ steps: - id: "Build Container Image" name: gcr.io/k8s-skaffold/pack - args: ["build", "${_IMAGE_NAME}", "--builder=gcr.io/buildpacks/builder", + args: ["build", "${_IMAGE_NAME}", "--builder=gcr.io/buildpacks/builder:google-24", "--env", "GOOGLE_PYTHON_VERSION=${_PYTHON_VERSION}"] - id: "Push Container Image" From 25a2f4507a4f91fc485a3adf8af38427e8c0faad Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Tue, 17 Feb 2026 14:53:26 +1100 Subject: [PATCH 3/4] debug: see if latest 5.x package supports old testing --- run/django/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run/django/requirements.txt b/run/django/requirements.txt index de944d236aa..f6c595b01af 100644 --- a/run/django/requirements.txt +++ b/run/django/requirements.txt @@ -1,4 +1,4 @@ -Django==6.0.2 +Django==5.2.11 django-storages[google]==1.14.6 django-environ==0.12.0 psycopg2-binary==2.9.11 From 21f33f546b29c10de2f1230b815095ca7ae76534 Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Tue, 17 Feb 2026 15:17:21 +1100 Subject: [PATCH 4/4] Revert "debug: see if latest 5.x package supports old testing" This reverts commit 25a2f4507a4f91fc485a3adf8af38427e8c0faad. --- run/django/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run/django/requirements.txt b/run/django/requirements.txt index f6c595b01af..de944d236aa 100644 --- a/run/django/requirements.txt +++ b/run/django/requirements.txt @@ -1,4 +1,4 @@ -Django==5.2.11 +Django==6.0.2 django-storages[google]==1.14.6 django-environ==0.12.0 psycopg2-binary==2.9.11