diff --git a/sdks/go.mod b/sdks/go.mod index 1d6c461baee4..bc427296c6fa 100644 --- a/sdks/go.mod +++ b/sdks/go.mod @@ -30,7 +30,7 @@ require ( cloud.google.com/go/datastore v1.24.0 cloud.google.com/go/profiler v0.6.0 cloud.google.com/go/pubsub v1.50.2 - cloud.google.com/go/spanner v1.91.0 + cloud.google.com/go/spanner v1.92.0 cloud.google.com/go/storage v1.62.3 github.com/aws/aws-sdk-go-v2 v1.42.0 github.com/aws/aws-sdk-go-v2/config v1.32.25 diff --git a/sdks/go.sum b/sdks/go.sum index 49edbd2680d1..2c8a4867ae6c 100644 --- a/sdks/go.sum +++ b/sdks/go.sum @@ -90,8 +90,8 @@ cloud.google.com/go/pubsub v1.50.2/go.mod h1:jyCWeZdGFqd4mitSsBERnJcpqaHBsxQoPkN cloud.google.com/go/pubsub/v2 v2.6.0 h1:8pjR0id+GTB+krKx5G6AGJoYrHog58w2Q89PCOrfM64= cloud.google.com/go/pubsub/v2 v2.6.0/go.mod h1:4anqvV/w8Pcgu2tO0qr2XgsF3GXHowzryfQ5gOnVmWY= cloud.google.com/go/secretmanager v1.3.0/go.mod h1:+oLTkouyiYiabAQNugCeTS3PAArGiMJuBqvJnJsyH+U= -cloud.google.com/go/spanner v1.91.0 h1:XwXfcZ0kc1NT9Uu2IsThFiWtYptB+WgLn/KZEZcyzRg= -cloud.google.com/go/spanner v1.91.0/go.mod h1:8NB5a7qgwIhGD19Ly+vkpKffPL78vIG9RcrgsuREha0= +cloud.google.com/go/spanner v1.92.0 h1:cfeMNmtFjz+OYzQVCIuGBw4Cik4CbF2ptXMuRQcUar0= +cloud.google.com/go/spanner v1.92.0/go.mod h1:rCDPfWXNX0h+t484r+crCEaaMKbJfoWkHRDKU3H3+oY= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/AsyncWrapperTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/AsyncWrapperTest.java index e95f586e8849..183b1851459c 100644 --- a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/AsyncWrapperTest.java +++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/AsyncWrapperTest.java @@ -230,21 +230,20 @@ private void waitForEmpty(AsyncWrapper asyncWrapper) { } private void waitForEmpty(AsyncWrapper asyncWrapper, int timeoutSeconds) { - int count = 0; + long limit = System.currentTimeMillis() + timeoutSeconds * 1000L; while (!asyncWrapper.isEmpty()) { + if (System.currentTimeMillis() > limit) { + throw new RuntimeException("Timed out waiting for async dofn to be empty"); + } try { - Thread.sleep(1000); + Thread.sleep(5); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } - count += 1; - if (count > timeoutSeconds) { - throw new RuntimeException("Timed out waiting for async dofn to be empty"); - } } try { - Thread.sleep(1000); + Thread.sleep(5); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -419,7 +418,7 @@ public void testMultiKey() { // execution task has not finished processing yet. @Test public void testLongItem() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(500); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -438,7 +437,7 @@ public void testLongItem() { assertEquals(0, dofn.getProcessed()); assertEquals(1, fakeBagState.items.size()); - waitForEmpty(asyncWrapper, 20); + waitForEmpty(asyncWrapper, 2); result = asyncWrapper.commitFinishedItemsDirect( @@ -538,7 +537,7 @@ public void testMultiElementDofn() { // Identical elements should not spawn multiple concurrent background executions. @Test public void testDuplicates() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(10); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -568,7 +567,7 @@ public void testDuplicates() { // has cleared are correctly tracked and processed. @Test public void testSlowDuplicates() { - BasicDofn dofn = new BasicDofn(5000); + BasicDofn dofn = new BasicDofn(20); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -581,7 +580,7 @@ public void testSlowDuplicates() { asyncWrapper.processDirect(msg, GlobalWindow.INSTANCE, Instant.now(), fakeBagState, fakeTimer); try { - Thread.sleep(10000); + Thread.sleep(100); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -610,7 +609,7 @@ public void testSlowDuplicates() { // and decrement immediately upon execution completion. @Test public void testBufferCount() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(10); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -637,7 +636,7 @@ public void testBufferCount() { // the scheduler must block and delay submissions appropriately. @Test public void testBufferStopsAcceptingItems() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(500); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, @@ -670,7 +669,7 @@ public void testBufferStopsAcceptingItems() { } try { - Thread.sleep(200); + Thread.sleep(100); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -707,7 +706,7 @@ public void testBufferStopsAcceptingItems() { // Verifies actively cancelled elements are cleanly dropped from the buffer during throttling. @Test public void testBufferWithCancellation() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(10); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -746,7 +745,7 @@ public void testBufferWithCancellation() { // across multiple keys correctly under heavy multi-threaded load. @Test public void testLoadCorrectness() { - BasicDofn dofn = new BasicDofn(1000); + BasicDofn dofn = new BasicDofn(10); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, @@ -791,14 +790,14 @@ public void testLoadCorrectness() { timers.get(key)); })); try { - Thread.sleep(random.nextInt(200)); + Thread.sleep(random.nextInt(2)); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } try { - Thread.sleep(3000 + random.nextInt(2000)); + Thread.sleep(1000 + random.nextInt(1000)); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -834,7 +833,7 @@ public void testLoadCorrectness() { } } try { - Thread.sleep(1000 + random.nextInt(2000)); + Thread.sleep(10 + random.nextInt(20)); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -854,7 +853,7 @@ public void testLoadCorrectness() { // must complete cleanly without thread or lock deadlocks. @Test public void testResetStateConcurrentTeardown() { - BasicDofn dofn = new BasicDofn(500); + BasicDofn dofn = new BasicDofn(10); AsyncWrapper asyncWrapper = new AsyncWrapper<>( dofn, 1, Duration.standardSeconds(5), null, null, null, null, useThreadPool); @@ -867,7 +866,7 @@ public void testResetStateConcurrentTeardown() { KV.of("key1", "1"), GlobalWindow.INSTANCE, Instant.now(), fakeBagState, fakeTimer); try { - Thread.sleep(50); + Thread.sleep(2); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } diff --git a/sdks/java/extensions/opentelemetry-gcp-auth-extension/src/main/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider b/sdks/java/extensions/opentelemetry-gcp-auth-extension/src/main/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider deleted file mode 100644 index bf1ba2cad985..000000000000 --- a/sdks/java/extensions/opentelemetry-gcp-auth-extension/src/main/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -org.apache.beam.sdk.extensions.opentelemetry.gcp.auth.GcpAuthAutoConfigurationCustomizerProvider diff --git a/sdks/python/setup.py b/sdks/python/setup.py index aabe0395f6dd..027b3f65039c 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -426,7 +426,7 @@ def get_portability_package_data(): 'fasteners>=0.3,<1.0', 'grpcio>=1.33.1,<2,!=1.48.0,!=1.59.*,!=1.60.*,!=1.61.*,!=1.62.0,!=1.62.1,!=1.66.*,!=1.67.*,!=1.68.*,!=1.69.*,!=1.70.*', # pylint: disable=line-too-long 'httplib2>=0.8,<0.32.0', - 'jsonpickle>=3.0.0,<4.0.0', + 'jsonpickle>=3.0.4,<5.0.0', # numpy can have breaking changes in minor versions. # Use a strict upper bound. 'numpy>=1.14.3,<2.5.0', # Update pyproject.toml as well.