From 0ce83c8b2dbfabe21825db4e5a17738508e974a2 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Wed, 29 Jul 2026 14:52:59 -0400 Subject: [PATCH] Change syncRemoteTask scheduled task to be a POST (#3185) Turns out before we were using GET for everything. The action is, and should remain, a POST on the back end so let's call that. --- .../files/tasks/cloud-scheduler-tasks-production.xml | 1 + release/builder/deployCloudSchedulerAndQueue.go | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/google/registry/config/files/tasks/cloud-scheduler-tasks-production.xml b/core/src/main/java/google/registry/config/files/tasks/cloud-scheduler-tasks-production.xml index bccd6c189..020e4c3c6 100644 --- a/core/src/main/java/google/registry/config/files/tasks/cloud-scheduler-tasks-production.xml +++ b/core/src/main/java/google/registry/config/files/tasks/cloud-scheduler-tasks-production.xml @@ -326,6 +326,7 @@ syncRemoteCache + POST Syncs remote (Valkey/Redis) EPP resource caches with changes made recently. diff --git a/release/builder/deployCloudSchedulerAndQueue.go b/release/builder/deployCloudSchedulerAndQueue.go index a33d49452..9d4f6b239 100644 --- a/release/builder/deployCloudSchedulerAndQueue.go +++ b/release/builder/deployCloudSchedulerAndQueue.go @@ -71,6 +71,7 @@ type Task struct { Timeout string `xml:"timeout"` Schedule string `xml:"schedule"` Name string `xml:"name"` + Method string `xml:"method"` } type QueuesSyncManager struct { @@ -191,6 +192,11 @@ func (manager TasksSyncManager) getArgs(task Task, operationType string) []strin var uri string uri = fmt.Sprintf("https://%s.%s%s", service, baseDomain, strings.TrimSpace(task.URL)) + method := "get" + if task.Method != "" { + method = strings.ToLower(task.Method) + } + args := []string{ "--project", projectName, "scheduler", "jobs", operationType, @@ -199,7 +205,7 @@ func (manager TasksSyncManager) getArgs(task Task, operationType string) []strin "--schedule", task.Schedule, "--uri", uri, "--description", description, - "--http-method", "get", + "--http-method", method, "--oidc-service-account-email", getCloudSchedulerServiceAccountEmail(), "--oidc-token-audience", clientId, }