Skip to content

Commit

Permalink
update to latest version of storage client
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwarejones committed Jan 3, 2025
1 parent 98dfdaa commit 650fd45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ bazel_dep(
version = "0.99.1",
repo_name = "wfa_common_jvm",
)
# DO_NOT_SUBMIT (world-federation-of-advertisers/common-jvm#XXX)
# DO_NOT_SUBMIT (world-federation-of-advertisers/common-jvm#295)
archive_override(
module_name = "common-jvm",
strip_prefix = "common-jvm-63474cc50dbff81388b99e95572728f1325ae9db",
urls = "https://github.com/world-federation-of-advertisers/common-jvm/archive/63474cc50dbff81388b99e95572728f1325ae9db.tar.gz",
strip_prefix = "common-jvm-d23dbac4990e80a80260910e13692054c22b8669",
urls = "https://github.com/world-federation-of-advertisers/common-jvm/archive/d23dbac4990e80a80260910e13692054c22b8669.tar.gz",
)
bazel_dep(
name = "common-cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ class DataWatcher(
val data = builder.build()
val bucket = data.getBucket()
val blobKey = data.getName()
val path = "gs://" + bucket + "/" + blobKey
dataWatcherConfigs.forEach { config ->
val regex = config.sourcePathRegex.toRegex()
if (regex.containsMatchIn(path)) {
if (regex.containsMatchIn(blobKey)) {
@Suppress("WHEN_ENUM_CAN_BE_NULL_IN_JAVA")
when (config.sinkConfigCase) {
DataWatcherConfig.SinkConfigCase.CONTROL_PLANE_CONFIG -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DataWatcherTest() {
val subscribingStorageClient = GcsSubscribingStorageClient(inMemoryStorageClient)

val dataWatcherConfig = dataWatcherConfig {
sourcePathRegex = "^gs://fake-bucket/path-to-watch"
sourcePathRegex = "^path-to-watch"
this.controlPlaneConfig = controlPlaneConfig {
queueName = topicId
appConfig = Any.pack(Int32Value.newBuilder().setValue(5).build())
Expand All @@ -59,7 +59,7 @@ class DataWatcherTest() {
subscribingStorageClient.subscribe(dataWatcher)

subscribingStorageClient.writeBlob(
"gs://fake-bucket/path-to-watch/some-data",
"path-to-watch/some-data",
flowOf("some-data".toByteStringUtf8())
)
val createWorkItemRequestCaptor = argumentCaptor<CreateWorkItemRequest>()
Expand All @@ -77,7 +77,7 @@ class DataWatcherTest() {
val subscribingStorageClient = GcsSubscribingStorageClient(inMemoryStorageClient)

val dataWatcherConfig = dataWatcherConfig {
sourcePathRegex = "^gs://fake-bucket/path-to-watch"
sourcePathRegex = "^path-to-watch"
this.controlPlaneConfig = controlPlaneConfig {
queueName = topicId
appConfig = Any.pack(Int32Value.newBuilder().setValue(5).build())
Expand All @@ -88,7 +88,7 @@ class DataWatcherTest() {
subscribingStorageClient.subscribe(dataWatcher)

subscribingStorageClient.writeBlob(
"gs://fake-bucket/some-other-path/some-data",
"some-other-path/some-data",
flowOf("some-data".toByteStringUtf8())
)
val createWorkItemRequestCaptor = argumentCaptor<CreateWorkItemRequest>()
Expand Down

0 comments on commit 650fd45

Please sign in to comment.