fix(async): propagate cancellation through service futures#759
fix(async): propagate cancellation through service futures#759goutamadwant wants to merge 1 commit into
Conversation
|
Just a note on the size of the diff. Most of the changed files are generated async service implementations. They all use the same future chain: prepare the request, call This patch adds internal future helpers in core and applies them consistently across the generated async services. I also updated the default logging and retrying HTTP wrappers because they add their own No public cancellation API was added. The change keeps the existing API shape and makes cancellation propagate through the existing future chain. |
Fixes #654.
Summary
EmbeddingServiceAsync.create()through the default client stack.Tests
./scripts/lint./scripts/test./gradlew :openai-java-core:test --tests com.openai.core.FuturesTest --tests com.openai.services.async.EmbeddingServiceAsyncTest.create_whenFutureCancelled_cancelsHttpFuture./gradlew :openai-java-client-okhttp:test --tests com.openai.client.okhttp.OkHttpClientTest.executeAsync_whenFutureCancelled_cancelsUnderlyingCall