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

🎨 [Frontend] Check all linked nodes exist before loading Study #6762

Merged

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Nov 19, 2024

What do these changes do?

It can happen (@AntoninoMarioC), still not sure how, that some node inputs point to nodes that do not exist, making the deserialization of the Study when opening it buggy. This PR checks the links before opening a Study and if it finds any mismatch it will block the Study from being open.

Corrupt

Related issue/s

How to test

Dev-ops checklist

@odeimaiz odeimaiz self-assigned this Nov 19, 2024
@odeimaiz odeimaiz added this to the Event Horizon milestone Nov 19, 2024
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Nov 19, 2024
@odeimaiz odeimaiz marked this pull request as ready for review November 19, 2024 12:07
Copy link
Member

@mguidon mguidon left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks! 👍 In my opinion, blocking the study from being opened is a rather harsh solution. I would prefer to remove the corrupted links and display a warning message instead. What if the user needs to open the project to download some data? I wouldn’t prohibit that unless opening the project itself would also be corrupted due to the issue.

@odeimaiz
Copy link
Member Author

Thanks! 👍 In my opinion, blocking the study from being opened is a rather harsh solution. I would prefer to remove the corrupted links and display a warning message instead. What if the user needs to open the project to download some data? I wouldn’t prohibit that unless opening the project itself would also be corrupted due to the issue.

@matusdrobuliak66
Users can still download the data from the Study Data page, and yes if they open a corrupt study things might get worse.

@odeimaiz
Copy link
Member Author

@matusdrobuliak66 Fix and continue could still be an option we provide, making clear that some links will be removed.

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Suggested something less harsh for the fearful user

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👀

@odeimaiz odeimaiz enabled auto-merge (squash) November 19, 2024 14:12
@odeimaiz odeimaiz merged commit 0a52ba5 into ITISFoundation:master Nov 19, 2024
51 checks passed
@odeimaiz odeimaiz deleted the enh/check-links-before-loading branch November 19, 2024 14:43
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jan 15, 2025
58 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants