Repository navigation
[TEST] Fix cancellation assertions for missing local batch applications - #7879
Open
zhangxinyao88 wants to merge 1 commit into
Open
zhangxinyao88 wants to merge 1 commit into
zhangxinyao88 wants to merge 1 commit into
Conversation
zhangxinyao88
marked this pull request as ready for review
November 29, 2026 16:07
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
A local batch application can disappear before Kyuubi handles its cancellation request. JPS then returns
APPLICATION_NOT_FOUNDwithkilled=false, butBatchJobSubmission.closestill transitions the nonterminal operation toCANCELED. The existing REST test incorrectly assumes a false kill result rules out that state.This caused the
open batch sessionassertion to fail in this CI job. RequireCANCELEDfor that specific response as well as a successful kill, while retaining the existing assertion for other failure responses. Production behavior is unchanged.How was this patch tested?
BatchesV1ResourceSuite15/15 andBatchesV2ResourceSuite15/15, on macOS arm64, JDK 17, Scala 2.12.19 and Spark 3.5.9.false / APPLICATION_NOT_FOUND / CANCELEDresponse failed the old postcondition and passed the corrected one, without relying on the short application's exit timing.dev/reformat, reactor Spotless and Scalastyle checks, and the root Apache RAT check.build/mvn -Pscala-2.12 -Pspark-provided -Pflink-provided -Phive-provided \ -pl kyuubi-server -am test -Dtest=none \ -DwildcardSuites=org.apache.kyuubi.server.api.v1.BatchesV1ResourceSuite,org.apache.kyuubi.server.api.v1.BatchesV2ResourceSuiteSPARK_HOMEused Spark 3.5.9, with SparkPi and DriverSubmissionTest built locally from the official v3.5.9 example sources. The controlled probe is additional diagnostic evidence, separate from the original suites. The full repository suite and other platform/engine matrices have not been run locally.Draft pending author review. Remote CI results will be recorded when available.
Was this patch assisted by generative AI tooling?
Assisted-by: Codex (GPT-6)