apache / submarine

Submarine is Cloud Native Machine Learning Platform.
https://submarine.apache.org/
Apache License 2.0
691 stars 254 forks source link

SUBMARINE-1379. Fix a bug where tasks from missing k8s resources could not be deleted on the UI #1073

Closed cdmikechen closed 1 year ago

cdmikechen commented 1 year ago

What is this PR for?

If the backend CR is manually deleted, the submarine-server is not currently checking if the specified resource still exists, resulting in a situation where the experiment cannot be deleted in UI.

What type of PR is it?

Bug Fix

Todos

What is the Jira issue?

https://issues.apache.org/jira/browse/SUBMARINE-1379

How should this be tested?

CI tests can cover code, but they can only represent processes that handle normal conditions. I removed the method of throwing an 404 exception error (.throwsApiException()) when the resource does not exist, which results in the return of the status object. In this way, we can return the result normally, even without this resource

Screenshots (if appropriate)

NA

Questions:

codecov[bot] commented 1 year ago

Codecov Report

Merging #1073 (03a7011) into master (b0d96b3) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1073   +/-   ##
=======================================
  Coverage   67.27%   67.27%           
=======================================
  Files         128      128           
  Lines        6224     6224           
=======================================
  Hits         4187     4187           
  Misses       2037     2037           
Flag Coverage Δ
python-integration 54.20% <ø> (ø)
python-unit 48.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more