-
Notifications
You must be signed in to change notification settings - Fork 68
fix: improve error messaging for LRO CancellationException #3873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please mention the previous attempt as well #2236?
LOGGER.log( | ||
Level.WARNING, | ||
"The task has been cancelled. Please refer to " | ||
"The task has been cancelled. Possible reasons include a timeout or " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change the wording of The task has been cancelled
as well. It is confusing to customers that they may think the "task has been cancelled by the backend" or "task has been cancelled by another process". But actually the task is timed out not cancelled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like The long running operation request is no longer being tracked due to timeout or exceeding the number of polling attempts
(or related). Something to make it clear that the backend task runs independent of the client's polling logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! And I like that wording. Let me know your thoughts on b714220?
gax-java/gax/src/main/java/com/google/api/gax/longrunning/OperationTimedPollAlgorithm.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Lawrence Qiu <[email protected]>
|
|
🤖 I have created a release *beep* *boop* --- <details><summary>2.61.0</summary> ## [2.61.0](v2.60.2...v2.61.0) (2025-08-04) ### Features * **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#3852](#3852)) ([2d02344](2d02344)) ### Bug Fixes * improve error messaging for LRO CancellationException ([#3873](#3873)) ([9cae675](9cae675)) * make generation config update logs verbose ([#3764](#3764)) ([9b1a34b](9b1a34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- <details><summary>2.61.0</summary> ## [2.61.0](v2.60.2...v2.61.0) (2025-08-04) ### Features * **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#3852](#3852)) ([2d02344](2d02344)) ### Bug Fixes * improve error messaging for LRO CancellationException ([#3873](#3873)) ([9cae675](9cae675)) * make generation config update logs verbose ([#3764](#3764)) ([9b1a34b](9b1a34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- <details><summary>2.61.0</summary> ## [2.61.0](v2.60.2...v2.61.0) (2025-08-04) ### Features * **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#3852](#3852)) ([2d02344](2d02344)) ### Bug Fixes * improve error messaging for LRO CancellationException ([#3873](#3873)) ([9cae675](9cae675)) * make generation config update logs verbose ([#3764](#3764)) ([9b1a34b](9b1a34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.60.0` -> `2.61.0` | | [com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.59.0` -> `2.60.0` | | [com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.59.0` -> `2.60.0` | | [com.google.api:gax](https://github.com/googleapis/sdk-platform-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.69.0` -> `2.70.0` | | [org.jetbrains.kotlin.jvm](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | plugin | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin.plugin.jpa](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | plugin | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin.plugin.allopen](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | plugin | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-test](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-stdlib-jdk8](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-reflect](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-noarg](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-gradle-plugins-bom](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-compiler-embeddable](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [org.jetbrains.kotlin:kotlin-bom](https://kotlinlang.org/) ([source](https://github.com/JetBrains/kotlin)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.1.20` -> `2.1.21` | | [com.github.docker-java:docker-java-transport-httpclient5](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.5.3` -> `3.6.0` | | [com.github.docker-java:docker-java-transport](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.5.3` -> `3.6.0` | | [com.github.docker-java:docker-java-core](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.5.3` -> `3.6.0` | | [com.github.docker-java:docker-java-api](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.5.3` -> `3.6.0` | | [com.github.docker-java:docker-java](https://github.com/docker-java/docker-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `3.5.3` -> `3.6.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:regions](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.32.25` -> `2.32.26` | --- ### Release Notes <details> <summary>googleapis/sdk-platform-java (com.google.api.grpc:proto-google-common-protos)</summary> ### [`v2.61.0`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2610-2025-08-04) ##### Features - **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#​3852](googleapis/sdk-platform-java#3852)) ([2d02344](googleapis/sdk-platform-java@2d02344)) ##### Bug Fixes - improve error messaging for LRO CancellationException ([#​3873](googleapis/sdk-platform-java#3873)) ([9cae675](googleapis/sdk-platform-java@9cae675)) - make generation config update logs verbose ([#​3764](googleapis/sdk-platform-java#3764)) ([9b1a34b](googleapis/sdk-platform-java@9b1a34b)) </details> <details> <summary>JetBrains/kotlin (org.jetbrains.kotlin.jvm)</summary> ### [`v2.1.21`](https://github.com/JetBrains/kotlin/releases/tag/v2.1.21): Kotlin 2.1.21 ##### Changelog ##### Backend. Native. Debug - [`KT-75991`](https://youtrack.jetbrains.com/issue/KT-75991) Xcode 16.3: Fix lldb stepping test over an inline function ##### Compiler - [`KT-75992`](https://youtrack.jetbrains.com/issue/KT-75992) Xcode 16.3: stacktraces on simulators are not symbolicated - [`KT-76663`](https://youtrack.jetbrains.com/issue/KT-76663) KJS: KotlinNothingValueException caused by expression return since 2.1.20 - [`KT-75756`](https://youtrack.jetbrains.com/issue/KT-75756) Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom script - [`KT-76209`](https://youtrack.jetbrains.com/issue/KT-76209) CONFLICTING\_UPPER\_BOUNDS on `Nothing` bound - [`KT-70352`](https://youtrack.jetbrains.com/issue/KT-70352) K2: False-negative CONFLICTING\_UPPER\_BOUNDS on `Nothing` bound - [`KT-74739`](https://youtrack.jetbrains.com/issue/KT-74739) Native: "IllegalArgumentException: All constructors should've been lowered: FUNCTION\_REFERENCE" - [`KT-75483`](https://youtrack.jetbrains.com/issue/KT-75483) Native: redundant unboxing generated with smart cast - [`KT-71425`](https://youtrack.jetbrains.com/issue/KT-71425) IR Inliner: investigate return type of an inlined block ##### Native - [`KT-76252`](https://youtrack.jetbrains.com/issue/KT-76252) Native: executable crash with generic value classes with 2.1.20 ##### Native. C and ObjC Import - [`KT-75781`](https://youtrack.jetbrains.com/issue/KT-75781) Xcode 16.3: Fix cinterop tests failing with fatal error: could not build module '\_stdint' ##### Native. Runtime. Memory - [`KT-74280`](https://youtrack.jetbrains.com/issue/KT-74280) Native: GC.collect crashes with -Xallocator=std ##### Tools. CLI - [`KT-75588`](https://youtrack.jetbrains.com/issue/KT-75588) \[2.1.20-RC] "was compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler" warnings despite using the same compiler version - [`KT-74663`](https://youtrack.jetbrains.com/issue/KT-74663) kotlinc-js CLI: not providing -ir-output-dir results in NullPointerException ##### Tools. Compiler Plugins - [`KT-76162`](https://youtrack.jetbrains.com/issue/KT-76162) "IllegalStateException: No mapping for symbol: VALUE\_PARAMETER INSTANCE\_RECEIVER" after updating to 2.1.20 ##### Tools. Gradle - [`KT-73682`](https://youtrack.jetbrains.com/issue/KT-73682) Compatibility with Gradle 8.12 release - [`KT-73142`](https://youtrack.jetbrains.com/issue/KT-73142) Kotlin Gradle plugin: Remove usage of Gradle's internal ExecHandleBuilder - [`KT-36004`](https://youtrack.jetbrains.com/issue/KT-36004) Update 'org.gradle.usage' attribute rules to support the 'JAVA\_API' and 'JAVA\_RUNTIME' value - [`KT-73968`](https://youtrack.jetbrains.com/issue/KT-73968) KotlinDependencyManagement tries to mutate configuration after it was resolved - [`KT-73684`](https://youtrack.jetbrains.com/issue/KT-73684) Run integration tests against Gradle 8.12 - [`KT-72694`](https://youtrack.jetbrains.com/issue/KT-72694) Accessing Task.project during execution is being deprecated in Gradle 8.12 - [`KT-73683`](https://youtrack.jetbrains.com/issue/KT-73683) Compile against Gradle API 8.12 ##### Tools. Gradle. JS - [`KT-77119`](https://youtrack.jetbrains.com/issue/KT-77119) KJS: Gradle: Setting custom environment variables in KotlinJsTest tasks no longer works - [`KT-74735`](https://youtrack.jetbrains.com/issue/KT-74735) KGP uses Gradle internal `CompositeProjectComponentArtifactMetadata` - [`KT-71879`](https://youtrack.jetbrains.com/issue/KT-71879) Notice of upcoming deprecation for Boolean 'is-' properties in Gradle Groovy scripts ##### Tools. Gradle. Multiplatform - [`KT-75808`](https://youtrack.jetbrains.com/issue/KT-75808) KGP: MPP with jvm target and Gradle java-test-fixtures is broken - [`KT-75605`](https://youtrack.jetbrains.com/issue/KT-75605) Dependency resolution fails in commonTest/nativeTest source sets for KMP module when depending on another project due to missing PSM - [`KT-75512`](https://youtrack.jetbrains.com/issue/KT-75512) Maven-publish: ArtifactId is not correct in`pom` file with customized `withXml` ##### Tools. Incremental Compile - [`KT-62555`](https://youtrack.jetbrains.com/issue/KT-62555) Wrong ABI fingerprint for inline function containing a lambda - [`KT-75883`](https://youtrack.jetbrains.com/issue/KT-75883) Follow-up: switch from INSTANCE heuristic to outerClass chain ##### Tools. Kapt - [`KT-75936`](https://youtrack.jetbrains.com/issue/KT-75936) K2 KAPT: unsupported FIR element kinds in constant evaluation - [`KT-75942`](https://youtrack.jetbrains.com/issue/KT-75942) K2 KAPT: underscore not allowed here ##### Tools. Scripts - [`KT-76424`](https://youtrack.jetbrains.com/issue/KT-76424) Dependencies in main.kts not working with 2.1.20 - [`KT-76296`](https://youtrack.jetbrains.com/issue/KT-76296) Kotlin script compiler crashes when secondary constructor calls a function - [`KT-75589`](https://youtrack.jetbrains.com/issue/KT-75589) Scripts: "IndexOutOfBoundsException in jdk.internal.util.Preconditions.outOfBounds" when trying to extend a class which uses global variable ##### Tools. Wasm - [`KT-76161`](https://youtrack.jetbrains.com/issue/KT-76161) Wasm: "export startUnitTests was not found" after updating to Kotlin 2.1.20 </details> <details> <summary>docker-java/docker-java (com.github.docker-java:docker-java-transport-httpclient5)</summary> ### [`v3.6.0`](https://github.com/docker-java/docker-java/releases/tag/3.6.0) [Compare Source](docker-java/docker-java@3.5.3...3.6.0) ##### Changes - Bump org.apache.commons:commons-compress from 1.27.1 to 1.28.0 [@​dependabot](https://github.com/dependabot) ([#​2486](docker-java/docker-java#2486)) - Bump jersey.version from 2.30.1 to 2.47 [@​dependabot](https://github.com/dependabot) ([#​2496](docker-java/docker-java#2496)) - Bump netty.version from 4.2.3.Final to 4.2.4.Final [@​dependabot](https://github.com/dependabot) ([#​2494](docker-java/docker-java#2494)) - Bump org.assertj:assertj-core from 3.27.3 to 3.27.4 [@​dependabot](https://github.com/dependabot) ([#​2489](docker-java/docker-java#2489)) - Bump jackson.version from 2.18.4 to 2.19.2 [@​dependabot](https://github.com/dependabot) ([#​2485](docker-java/docker-java#2485)) - Bump commons-io:commons-io from 2.19.0 to 2.20.0 [@​dependabot](https://github.com/dependabot) ([#​2480](docker-java/docker-java#2480)) - Bump org.junit.jupiter:junit-jupiter from 5.13.3 to 5.13.4 [@​dependabot](https://github.com/dependabot) ([#​2482](docker-java/docker-java#2482)) - Bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3 [@​dependabot](https://github.com/dependabot) ([#​2469](docker-java/docker-java#2469)) - Bump netty.version from 4.2.2.Final to 4.2.3.Final [@​dependabot](https://github.com/dependabot) ([#​2477](docker-java/docker-java#2477)) - Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0 [@​dependabot](https://github.com/dependabot) ([#​2478](docker-java/docker-java#2478)) - Fix typo 'deamon' to 'daemon' [@​sehyuk080101](https://github.com/sehyuk080101) ([#​2476](docker-java/docker-java#2476)) ##### 📈 Enhancements - Add support for container wait conditions [@​tejksat](https://github.com/tejksat) ([#​2487](docker-java/docker-java#2487)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 67c534111b00bc4c6a439915d184f36b5fd21ae7
🤖 I have created a release *beep* *boop* --- <details><summary>2.61.0</summary> ## [2.61.0](v2.60.2...v2.61.0) (2025-08-04) ### Features * **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#3852](#3852)) ([2d02344](2d02344)) ### Bug Fixes * improve error messaging for LRO CancellationException ([#3873](#3873)) ([9cae675](9cae675)) * make generation config update logs verbose ([#3764](#3764)) ([9b1a34b](9b1a34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- <details><summary>2.61.0</summary> ## [2.61.0](v2.60.2...v2.61.0) (2025-08-04) ### Features * **mtls:** Add support for X.509-based mTLS-transport in Java GAX lib ([#3852](#3852)) ([2d02344](2d02344)) ### Bug Fixes * improve error messaging for LRO CancellationException ([#3873](#3873)) ([9cae675](9cae675)) * make generation config update logs verbose ([#3764](#3764)) ([9b1a34b](9b1a34b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Context: 433564823
Previously, we improved the error message by adding a link to our LRO documentation, but we need to include additional clarification into why the task was canceled (whether due to a timeout, reaching maximum attempts, or another reason). This PR lists these possible causes in the log statement.