Skip to content

Conversation

@cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Dec 4, 2025

Description

This PR fixes an issue that occurred during the reload of nodes that had syntax errors in their description. This caused an uncaught SyntaxError exception that was raised during the automatic parsing of the file in importlib.reload, before reaching the validation step for the description (which ensures all the attributes have been correctly written, with the expected types and so on).

On the UI side, this meant that the "Reload All Plugins" feature would stop without any notice as soon as a syntax error was encountered. This translated by the "Reloading plugins..." message being sent but never followed by another message.

With the changes in the PR, the SyntaxError exception is correctly caught, and the node status set accordingly. This does not interrupt the reloading process for all the nodes anymore, and if an error is encountered, an error message is sent with the list of all the nodes that were not successfully reloaded.

Nodes that are not reloaded because there has been no change in their description since the last time they were (re)loaded are not included in the error list.

A corresponding unit test is also added.

When reloading nodes, if some failed to be reloaded, the "Plugins reloaded"
message was still sent. We now keep track of those which failed to be
reloaded (meaning that the node descriptions were modified but there was
an actual error during the reloading process), and send an error message
listing the nodes that failed to be reloaded if there was any.
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.88%. Comparing base (6d03825) to head (109ddc0).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2947      +/-   ##
===========================================
+ Coverage    80.82%   80.88%   +0.06%     
===========================================
  Files           59       59              
  Lines         7844     7870      +26     
===========================================
+ Hits          6340     6366      +26     
  Misses        1504     1504              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants