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

Delete dataset display where analysis was deleted. #623

Closed
adkinsrs opened this issue Nov 1, 2023 · 8 comments
Closed

Delete dataset display where analysis was deleted. #623

adkinsrs opened this issue Nov 1, 2023 · 8 comments
Assignees
Labels
bug Something isn't working Low Priority Not the biggest concern at the moment. Also includes "nice to haves"

Comments

@adkinsrs
Copy link
Member

adkinsrs commented Nov 1, 2023

@JPReceveur had a situation where a dataset display did not show because the corresponding analysis h5ad was not found. The "user_saved" analysis ID directory was actually not present on the filesystem, leading me to believe that the user deleted the analysis. Currently our "delete analysis" CGI script just removes the analysis directory, but does not delete any corresponding dataset displays using this analysis.

Low priority since it seems like an edge case.

@adkinsrs adkinsrs added bug Something isn't working Low Priority Not the biggest concern at the moment. Also includes "nice to haves" labels Nov 1, 2023
@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 5, 2024

Observed a case in nemoanalytics where the user_saved analysis files + directory are missing. Dataset can be found near bottom of the link redirect in the opening comment of #847. Unsure if "delete_analysis" was run. One caveat to this, is that the original dataset supposedly has no metadata, so curation cannot happen unless it came from an analysis.

@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 7, 2024

Adding some commented-out code that would remove any displays where this analysis ID, and would cascade to remove dataset_preference and layout_displays entries with the same display ID. However I am leaving it commented out because I'm not sure if it is worse to have the display "mysteriously" vanish (from a user's perspective), or have the display show an error when drawn.

What I am also doing is adding better error-handling when analysis file paths are retrieved, so a user showing a display with a deleted analysis would have a better idea of the error

adkinsrs added a commit that referenced this issue Aug 7, 2024
@jorvis
Copy link
Member

jorvis commented Aug 7, 2024

Probably need to warn a user when they delete an analysis that there are displays depending on that analysis, so they can decide if they still want to remove it.

@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 7, 2024

That makes sense.

@JPReceveur
Copy link
Collaborator

JPReceveur commented Aug 9, 2024

Is there any cleanup we can do to make the error message related to this look nicer?

EDITED - removing image for security reasons

https://umgear.org/expression.html?gene_symbol=pou4f3&gene_symbol_exact_match=1&is_multigene=0&layout_id=d8a88ca9

@JPReceveur JPReceveur reopened this Aug 9, 2024
@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 9, 2024

oof, yea I'll fix that. And we definitely should not be showing the data structure paths.

@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 9, 2024

@JPReceveur care to check the new message. It's a generic "Can not retrieve AnnData object" error.

@adkinsrs
Copy link
Member Author

adkinsrs commented Aug 9, 2024

Adjusted error message to better reflect the actual issue (analysis h5ad not found)

@adkinsrs adkinsrs closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Low Priority Not the biggest concern at the moment. Also includes "nice to haves"
Projects
None yet
Development

No branches or pull requests

3 participants