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

DataCard is deleted before the dataset. #614

Closed
jay-m-dev opened this issue Sep 27, 2023 · 2 comments · Fixed by #623
Closed

DataCard is deleted before the dataset. #614

jay-m-dev opened this issue Sep 27, 2023 · 2 comments · Fixed by #623
Assignees
Milestone

Comments

@jay-m-dev
Copy link
Contributor

The datacard for a dataset should be deleted only until the dataset and all dependencies are deleted from the DB. The DELETE api/v1/datasets/:id returns HTTP code 200 when the dataset is deleted successfully. The datacard should remain on the GUI until code 200 is received.

Currently the datacard is deleted first and then the API call is sent.

Steps to recreate:

  1. Upload a dataset
  2. Enable the AI button (so that multiple experiments are triggered)
  3. Click the delete icon

After hitting the delete icon, the datacard disappears, but the dataset is not deleted (since there are running experiments).

Expected behavior:

The datacard should not disappear and one of the following options should occur:

  1. Alert the user that the dataset cannot be deleted, or
  2. disable the delete icon while experiments are running.
@HyunjunA
Copy link
Contributor

HyunjunA commented Oct 1, 2023

🛠 Code Update:

I've made changes to the code. Now, when the AI is active, clicking on the datacard's delete icon will trigger the displayed alert.
image

⚠️ Error Issue:

However, after deleting a datacard, a 500 error, as described below, is displayed as Jay explained. I am currently investigating potential causes of the states in React.js.
image

@jay-m-dev
Copy link
Contributor Author

jay-m-dev commented Oct 2, 2023

I was able to recreate this (even after getting the "Cannot delete dataset" alert in PR #621. See notes there too.
I'm going to further revise the DELETE API endpoint to also check the value of the ai field. If the value is on or requested, then the DELETE endpoint should not proceed to delete anything and should return HTTP code 409.

@jay-m-dev jay-m-dev linked a pull request Oct 2, 2023 that will close this issue
@jay-m-dev jay-m-dev removed a link to a pull request Oct 4, 2023
@jay-m-dev jay-m-dev linked a pull request Oct 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants