Skip to content
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

fix(api): handle delete experiment failures correctly #8459

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

stoksc
Copy link
Contributor

@stoksc stoksc commented Nov 21, 2023

Description

DeleteExperiments was misinterpreting the response from a function it called, resulting in non-sense behavior. I improved the API of the function and fixed the calling code. I also fixed some cases where we were erroneously logging errors on success cases.

Test Plan

  • has an integration test

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

DET-9978

@cla-bot cla-bot bot added the cla-signed label Nov 21, 2023
@stoksc stoksc requested a review from mapmeld November 21, 2023 03:35
Copy link

netlify bot commented Nov 21, 2023

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit e9af91d
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/655cd20bb5418b00086c890c

@stoksc stoksc marked this pull request as ready for review November 21, 2023 03:35
@stoksc stoksc requested a review from a team as a code owner November 21, 2023 03:35
@stoksc stoksc requested a review from jgongd November 21, 2023 03:35
@stoksc stoksc requested a review from jgongd November 21, 2023 15:51
Copy link
Contributor

@jgongd jgongd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -48,7 +48,9 @@ var (
// called twice for the same resource, etc).
func MockRM() *mocks.ResourceManager {
var mockRM mocks.ResourceManager
mockRM.On("DeleteJob", mock.Anything).Return(sproto.EmptyDeleteJobResponse(), nil)
mockRM.On("DeleteJob", mock.Anything).Return(func(sproto.DeleteJob) sproto.DeleteJobResponse {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why need a function func(sproto.DeleteJob) instead of returning sproto.EmptyDeleteJobResponse() directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the response gets reused for everything that calls it, and so we don't get a new channel and 2/3 of the jobs block indefinitely.

@stoksc stoksc merged commit c2a211d into main Nov 21, 2023
68 of 80 checks passed
@stoksc stoksc deleted the stoksc/chore/fix-delete-experiment-errors branch November 21, 2023 16:18
@dannysauer dannysauer added this to the 0.26.5 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants