apache / kyuubi

Apache Kyuubi is a distributed and multi-tenant gateway to provide serverless SQL on data warehouses and lakehouses.
https://kyuubi.apache.org/
Apache License 2.0
2.11k stars 916 forks source link

[KYUUBI #6668] Fix kyuubi batch state abnormal #6670

Closed turboFei closed 2 months ago

turboFei commented 2 months ago

:mag: Description

Issue References ๐Ÿ”—

This pull request fixes #6668

Describe Your Solution ๐Ÿ”ง

  1. when failed to kill the batch, check the current application info
  2. if the application state is UNKNOWN(less than submit timeout) or NOT_FOUND, mark the batch state to CANCELED
  3. If the k8s pod added after the batch marked as CANCELED, delete the pod

Types of changes :bookmark:

Test Plan ๐Ÿงช

Behavior Without This Pull Request :coffin:

Behavior With This Pull Request :tada:

Related Unit Tests


Checklist ๐Ÿ“

Be nice. Be informative.

turboFei commented 2 months ago

cc @pan3793 @ulysses-you @zwangsheng

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (dff40e8) to head (068eaf2). Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
...kyuubi/engine/KubernetesApplicationOperation.scala 0.00% 34 Missing :warning:
...g/apache/kyuubi/operation/BatchJobSubmission.scala 0.00% 14 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6670 +/- ## ====================================== Coverage 0.00% 0.00% ====================================== Files 683 684 +1 Lines 42205 42271 +66 Branches 5756 5764 +8 ====================================== - Misses 42205 42271 +66 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

turboFei commented 2 months ago

thanks, merged to 1.10.0/1.9.3