From 036d35c11a03654cf51e330c4d0978e6ce2facfe Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Fri, 12 Jan 2024 12:17:52 -0500 Subject: [PATCH] Make the BSA upload unvailable domains task work with HTTP GET as well (#2287) Apparently Google Cloud Scheduler can only do GET, not POST, for some reason. --- .../google/registry/bsa/UploadBsaUnavailableDomainsAction.java | 3 ++- .../test/resources/google/registry/module/bsa/bsa_routing.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/google/registry/bsa/UploadBsaUnavailableDomainsAction.java b/core/src/main/java/google/registry/bsa/UploadBsaUnavailableDomainsAction.java index 2a0b05ba0..a0bfc0e70 100644 --- a/core/src/main/java/google/registry/bsa/UploadBsaUnavailableDomainsAction.java +++ b/core/src/main/java/google/registry/bsa/UploadBsaUnavailableDomainsAction.java @@ -21,6 +21,7 @@ import static google.registry.model.tld.label.ReservedList.loadReservedLists; import static google.registry.persistence.PersistenceModule.TransactionIsolationLevel.TRANSACTION_REPEATABLE_READ; import static google.registry.persistence.transaction.TransactionManagerFactory.replicaTm; import static google.registry.persistence.transaction.TransactionManagerFactory.tm; +import static google.registry.request.Action.Method.GET; import static google.registry.request.Action.Method.POST; import static java.nio.charset.StandardCharsets.US_ASCII; @@ -70,7 +71,7 @@ import org.joda.time.DateTime; @Action( service = Service.BSA, path = "/_dr/task/uploadBsaUnavailableNames", - method = POST, + method = {GET, POST}, auth = Auth.AUTH_API_ADMIN) public class UploadBsaUnavailableDomainsAction implements Runnable { diff --git a/core/src/test/resources/google/registry/module/bsa/bsa_routing.txt b/core/src/test/resources/google/registry/module/bsa/bsa_routing.txt index fb58c1173..708206c8b 100644 --- a/core/src/test/resources/google/registry/module/bsa/bsa_routing.txt +++ b/core/src/test/resources/google/registry/module/bsa/bsa_routing.txt @@ -1,4 +1,4 @@ PATH CLASS METHODS OK AUTH_METHODS MIN USER_POLICY /_dr/task/bsaDownload BsaDownloadAction GET,POST n API APP ADMIN /_dr/task/bsaRefresh BsaRefreshAction GET,POST n API APP ADMIN -/_dr/task/uploadBsaUnavailableNames UploadBsaUnavailableDomainsAction POST n API APP ADMIN +/_dr/task/uploadBsaUnavailableNames UploadBsaUnavailableDomainsAction GET,POST n API APP ADMIN