From 96eb62878d76fd242398830c50aed5deeb269d96 Mon Sep 17 00:00:00 2001 From: YuhongWang-Amazon <123598495+YuhongWang-Amazon@users.noreply.github.com> Date: Wed, 19 Jul 2023 09:57:32 -0400 Subject: [PATCH] Migrate duchy postgres package to deploy/common (#1103) This migrates duchy postgres package from duchy/deploy/ to duchy/deploy/common/. --- .../duchy/deploy/{ => common}/postgres/BUILD.bazel | 6 +++--- .../postgres/PostgresComputationStatsService.kt | 4 ++-- .../postgres/PostgresComputationsService.kt | 8 ++++---- .../postgres/PostgresContinuationTokensService.kt | 6 +++--- .../deploy/{ => common}/postgres/readers/BUILD.bazel | 2 +- .../{ => common}/postgres/readers/ComputationReader.kt | 6 +++--- .../postgres/readers/ContinuationTokenReader.kt | 2 +- .../deploy/{ => common}/postgres/testing/BUILD.bazel | 0 .../deploy/{ => common}/postgres/testing/Schemata.kt | 2 +- .../deploy/{ => common}/postgres/writers/BUILD.bazel | 4 ++-- .../deploy/{ => common}/postgres/writers/ClaimWork.kt | 2 +- .../{ => common}/postgres/writers/CreateComputation.kt | 2 +- .../postgres/writers/InsertComputationStat.kt | 2 +- .../postgres/writers/SetContinutationToken.kt | 4 ++-- src/main/resources/duchy/postgres/BUILD.bazel | 2 +- .../measurement/duchy/deploy/postgres/BUILD.bazel | 10 +++++----- .../duchy/deploy/postgres/DuchySchemaTest.kt | 2 +- .../postgres/PostgresComputationStatsServiceTest.kt | 4 +++- .../postgres/PostgresContinuationTokensServiceTest.kt | 3 ++- 19 files changed, 37 insertions(+), 34 deletions(-) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/BUILD.bazel (77%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/PostgresComputationStatsService.kt (92%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/PostgresComputationsService.kt (96%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/PostgresContinuationTokensService.kt (91%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/readers/BUILD.bazel (92%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/readers/ComputationReader.kt (97%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/readers/ContinuationTokenReader.kt (95%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/testing/BUILD.bazel (100%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/testing/Schemata.kt (94%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/writers/BUILD.bazel (88%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/writers/ClaimWork.kt (99%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/writers/CreateComputation.kt (99%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/writers/InsertComputationStat.kt (96%) rename src/main/kotlin/org/wfanet/measurement/duchy/deploy/{ => common}/postgres/writers/SetContinutationToken.kt (95%) diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/BUILD.bazel similarity index 77% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/BUILD.bazel index fd67705ff41..b602dc25b22 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/BUILD.bazel @@ -4,12 +4,12 @@ kt_jvm_library( name = "services", srcs = glob(["*Service.kt"]), visibility = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__pkg__", + "//src/main/kotlin/org/wfanet/measurement/duchy/common/deploy/postgres:__pkg__", "//src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__pkg__", ], deps = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers", "//src/main/kotlin/org/wfanet/measurement/system/v1alpha:resource_key", "//src/main/proto/wfa/measurement/internal/duchy:continuation_tokens_service_kt_jvm_grpc_proto", "//src/main/proto/wfa/measurement/system/v1alpha:computation_log_entries_service_kt_jvm_grpc_proto", diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsService.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationStatsService.kt similarity index 92% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsService.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationStatsService.kt index 11296803a29..239302abe1d 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsService.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationStatsService.kt @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres +package org.wfanet.measurement.duchy.deploy.common.postgres import org.wfanet.measurement.common.db.r2dbc.DatabaseClient import org.wfanet.measurement.common.grpc.grpcRequire import org.wfanet.measurement.common.identity.IdGenerator -import org.wfanet.measurement.duchy.deploy.postgres.writers.InsertComputationStat +import org.wfanet.measurement.duchy.deploy.common.postgres.writers.InsertComputationStat import org.wfanet.measurement.internal.duchy.ComputationStatsGrpcKt.ComputationStatsCoroutineImplBase import org.wfanet.measurement.internal.duchy.CreateComputationStatRequest import org.wfanet.measurement.internal.duchy.CreateComputationStatResponse diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationsService.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationsService.kt similarity index 96% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationsService.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationsService.kt index 90d94f60296..b2331dee8be 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationsService.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresComputationsService.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres +package org.wfanet.measurement.duchy.deploy.common.postgres import io.grpc.Status import java.time.Clock @@ -28,9 +28,9 @@ import org.wfanet.measurement.common.toDuration import org.wfanet.measurement.duchy.db.computation.ComputationProtocolStageDetailsHelper import org.wfanet.measurement.duchy.db.computation.ComputationProtocolStagesEnumHelper import org.wfanet.measurement.duchy.db.computation.ComputationTypeEnumHelper -import org.wfanet.measurement.duchy.deploy.postgres.readers.ComputationReader -import org.wfanet.measurement.duchy.deploy.postgres.writers.ClaimWork -import org.wfanet.measurement.duchy.deploy.postgres.writers.CreateComputation +import org.wfanet.measurement.duchy.deploy.common.postgres.readers.ComputationReader +import org.wfanet.measurement.duchy.deploy.common.postgres.writers.ClaimWork +import org.wfanet.measurement.duchy.deploy.common.postgres.writers.CreateComputation import org.wfanet.measurement.duchy.name import org.wfanet.measurement.duchy.number import org.wfanet.measurement.duchy.service.internal.ComputationDetailsNotFoundException diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensService.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresContinuationTokensService.kt similarity index 91% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensService.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresContinuationTokensService.kt index 9f705329774..af5b1cf61d2 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensService.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/PostgresContinuationTokensService.kt @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres +package org.wfanet.measurement.duchy.deploy.common.postgres import io.grpc.Status import org.wfanet.measurement.common.db.r2dbc.DatabaseClient import org.wfanet.measurement.common.identity.IdGenerator -import org.wfanet.measurement.duchy.deploy.postgres.readers.ContinuationTokenReader -import org.wfanet.measurement.duchy.deploy.postgres.writers.SetContinuationToken +import org.wfanet.measurement.duchy.deploy.common.postgres.readers.ContinuationTokenReader +import org.wfanet.measurement.duchy.deploy.common.postgres.writers.SetContinuationToken import org.wfanet.measurement.duchy.service.internal.ContinuationTokenInvalidException import org.wfanet.measurement.duchy.service.internal.ContinuationTokenMalformedException import org.wfanet.measurement.internal.duchy.ContinuationTokensGrpcKt.ContinuationTokensCoroutineImplBase diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/BUILD.bazel similarity index 92% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/BUILD.bazel rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/BUILD.bazel index 39f653fe741..c91a4277eaa 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") package(default_visibility = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__subpackages__", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres:__subpackages__", ]) kt_jvm_library( diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ComputationReader.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ComputationReader.kt similarity index 97% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ComputationReader.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ComputationReader.kt index f6a9b2ac1ad..db157612417 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ComputationReader.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ComputationReader.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.readers +package org.wfanet.measurement.duchy.deploy.common.postgres.readers import com.google.protobuf.Timestamp import java.time.Instant @@ -196,7 +196,7 @@ class ComputationReader( ) { bind("$1", globalComputationId) } - return readContext.executeQuery(statement).consume(::Computation).firstOrNull() + return readContext.executeQuery(statement).consume(ComputationReader::Computation).firstOrNull() } private suspend fun readComputation( @@ -229,7 +229,7 @@ class ComputationReader( bind("$1", externalRequisitionKey.externalRequisitionId) bind("$2", externalRequisitionKey.requisitionFingerprint) } - return readContext.executeQuery(statement).consume(::Computation).firstOrNull() + return readContext.executeQuery(statement).consume(ComputationReader::Computation).firstOrNull() } /** diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ContinuationTokenReader.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ContinuationTokenReader.kt similarity index 95% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ContinuationTokenReader.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ContinuationTokenReader.kt index 27471dcafe9..61893a29e76 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers/ContinuationTokenReader.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers/ContinuationTokenReader.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.readers +package org.wfanet.measurement.duchy.deploy.common.postgres.readers import kotlinx.coroutines.flow.firstOrNull import org.wfanet.measurement.common.db.r2dbc.ReadContext diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing/BUILD.bazel similarity index 100% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing/BUILD.bazel rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing/BUILD.bazel diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing/Schemata.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing/Schemata.kt similarity index 94% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing/Schemata.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing/Schemata.kt index e2b249dd90f..a84e2fa3f14 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing/Schemata.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing/Schemata.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.testing +package org.wfanet.measurement.duchy.deploy.common.postgres.testing import java.nio.file.Path import org.wfanet.measurement.common.getJarResourcePath diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/BUILD.bazel b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/BUILD.bazel similarity index 88% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/BUILD.bazel rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/BUILD.bazel index a51828a77fa..e50f3b8e1c9 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/BUILD.bazel +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") package(default_visibility = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__subpackages__", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres:__subpackages__", ]) kt_jvm_library( @@ -9,7 +9,7 @@ kt_jvm_library( srcs = glob(["*.kt"]), deps = [ "//src/main/kotlin/org/wfanet/measurement/duchy/db/computation", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/readers", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/readers", "//src/main/kotlin/org/wfanet/measurement/duchy/service/internal:internal_exception", "//src/main/proto/wfa/measurement/internal/duchy:computation_details_kt_jvm_proto", "//src/main/proto/wfa/measurement/internal/duchy:computation_stats_service_kt_jvm_grpc_proto", diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/ClaimWork.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/ClaimWork.kt similarity index 99% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/ClaimWork.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/ClaimWork.kt index 72a2aabd655..d6ee5359fa1 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/ClaimWork.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/ClaimWork.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.writers +package org.wfanet.measurement.duchy.deploy.common.postgres.writers import com.google.protobuf.Message import java.time.Duration diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/CreateComputation.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/CreateComputation.kt similarity index 99% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/CreateComputation.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/CreateComputation.kt index 541872275fb..0c81a2f67c5 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/CreateComputation.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/CreateComputation.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.writers +package org.wfanet.measurement.duchy.deploy.common.postgres.writers import com.google.protobuf.ByteString import com.google.protobuf.Message diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/InsertComputationStat.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/InsertComputationStat.kt similarity index 96% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/InsertComputationStat.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/InsertComputationStat.kt index 72fce9c6a24..ec29812b2ef 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/InsertComputationStat.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/InsertComputationStat.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.writers +package org.wfanet.measurement.duchy.deploy.common.postgres.writers import java.time.Instant import org.wfanet.measurement.common.db.r2dbc.boundStatement diff --git a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/SetContinutationToken.kt b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/SetContinutationToken.kt similarity index 95% rename from src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/SetContinutationToken.kt rename to src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/SetContinutationToken.kt index cc3c17c1a25..73540d791a8 100644 --- a/src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/writers/SetContinutationToken.kt +++ b/src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/writers/SetContinutationToken.kt @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.wfanet.measurement.duchy.deploy.postgres.writers +package org.wfanet.measurement.duchy.deploy.common.postgres.writers import com.google.protobuf.InvalidProtocolBufferException import com.google.protobuf.util.Timestamps @@ -20,7 +20,7 @@ import java.time.Instant import org.wfanet.measurement.common.base64UrlDecode import org.wfanet.measurement.common.db.r2dbc.boundStatement import org.wfanet.measurement.common.db.r2dbc.postgres.PostgresWriter -import org.wfanet.measurement.duchy.deploy.postgres.readers.ContinuationTokenReader +import org.wfanet.measurement.duchy.deploy.common.postgres.readers.ContinuationTokenReader import org.wfanet.measurement.duchy.service.internal.ContinuationTokenInvalidException import org.wfanet.measurement.duchy.service.internal.ContinuationTokenMalformedException import org.wfanet.measurement.duchy.service.internal.DuchyInternalException diff --git a/src/main/resources/duchy/postgres/BUILD.bazel b/src/main/resources/duchy/postgres/BUILD.bazel index aac6c87783b..5b45c5b916e 100644 --- a/src/main/resources/duchy/postgres/BUILD.bazel +++ b/src/main/resources/duchy/postgres/BUILD.bazel @@ -1,6 +1,6 @@ package(default_visibility = [ + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres:__subpackages__", "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/gcloud/postgres:__subpackages__", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__subpackages__", "//src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres:__subpackages__", ]) diff --git a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel index 888690b91b1..9269ed8f3d0 100644 --- a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel +++ b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/BUILD.bazel @@ -5,7 +5,7 @@ kt_jvm_test( srcs = ["DuchySchemaTest.kt"], test_class = "org.wfanet.measurement.duchy.deploy.postgres.DuchySchemaTest", deps = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing", "@wfa_common_jvm//imports/java/com/google/common/truth", "@wfa_common_jvm//imports/java/com/opentable/db/postgres:pg_embedded", "@wfa_common_jvm//imports/java/org/junit", @@ -18,8 +18,8 @@ kt_jvm_test( srcs = ["PostgresContinuationTokensServiceTest.kt"], test_class = "org.wfanet.measurement.duchy.deploy.postgres.PostgresContinuationTokensServiceTest", deps = [ - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:services", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres:services", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing", "//src/main/kotlin/org/wfanet/measurement/duchy/service/internal/testing", "@wfa_common_jvm//imports/java/com/google/common/truth", "@wfa_common_jvm//imports/java/com/opentable/db/postgres:pg_embedded", @@ -34,8 +34,8 @@ kt_jvm_test( test_class = "org.wfanet.measurement.duchy.deploy.postgres.PostgresComputationStatsServiceTest", deps = [ "//src/main/kotlin/org/wfanet/measurement/duchy/db/computation/testing", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres:services", - "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/postgres/testing", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres:services", + "//src/main/kotlin/org/wfanet/measurement/duchy/deploy/common/postgres/testing", "//src/main/kotlin/org/wfanet/measurement/duchy/service/internal/computations", "//src/main/kotlin/org/wfanet/measurement/duchy/service/internal/testing", "@wfa_common_jvm//imports/java/com/google/common/truth", diff --git a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/DuchySchemaTest.kt b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/DuchySchemaTest.kt index b2abc8e8ff5..4450bc3a54f 100644 --- a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/DuchySchemaTest.kt +++ b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/DuchySchemaTest.kt @@ -23,7 +23,7 @@ import org.junit.runners.JUnit4 import org.wfanet.measurement.common.db.r2dbc.ResultRow import org.wfanet.measurement.common.db.r2dbc.boundStatement import org.wfanet.measurement.common.db.r2dbc.postgres.testing.EmbeddedPostgresDatabaseProvider -import org.wfanet.measurement.duchy.deploy.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH +import org.wfanet.measurement.duchy.deploy.common.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH @RunWith(JUnit4::class) class DuchySchemaTest { diff --git a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsServiceTest.kt b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsServiceTest.kt index e847ee2e361..29a0dc36102 100644 --- a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsServiceTest.kt +++ b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresComputationStatsServiceTest.kt @@ -26,7 +26,9 @@ import org.wfanet.measurement.common.identity.RandomIdGenerator import org.wfanet.measurement.duchy.db.computation.ComputationProtocolStageDetails import org.wfanet.measurement.duchy.db.computation.ComputationProtocolStages import org.wfanet.measurement.duchy.db.computation.ComputationTypes -import org.wfanet.measurement.duchy.deploy.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH +import org.wfanet.measurement.duchy.deploy.common.postgres.PostgresComputationStatsService +import org.wfanet.measurement.duchy.deploy.common.postgres.PostgresComputationsService +import org.wfanet.measurement.duchy.deploy.common.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH import org.wfanet.measurement.duchy.service.internal.testing.ComputationStatsServiceTest import org.wfanet.measurement.duchy.storage.ComputationStore import org.wfanet.measurement.duchy.storage.RequisitionStore diff --git a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensServiceTest.kt b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensServiceTest.kt index 4c2c6505d39..370c4db61ac 100644 --- a/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensServiceTest.kt +++ b/src/test/kotlin/org/wfanet/measurement/duchy/deploy/postgres/PostgresContinuationTokensServiceTest.kt @@ -20,7 +20,8 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.wfanet.measurement.common.db.r2dbc.postgres.testing.EmbeddedPostgresDatabaseProvider import org.wfanet.measurement.common.identity.RandomIdGenerator -import org.wfanet.measurement.duchy.deploy.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH +import org.wfanet.measurement.duchy.deploy.common.postgres.PostgresContinuationTokensService +import org.wfanet.measurement.duchy.deploy.common.postgres.testing.Schemata.DUCHY_CHANGELOG_PATH import org.wfanet.measurement.duchy.service.internal.testing.ContinuationTokensServiceTest @RunWith(JUnit4::class)