Repository navigation
✨ Show notif for unconnected compulsory ports and warning in CLI - #425
Conversation
6c712fc to
2c1c068
Compare
MFA-X-AI
left a comment
There was a problem hiding this comment.
I'm noticing that the CLI tests are failing here. Could you see what's up?
MFA-X-AI
left a comment
There was a problem hiding this comment.
One thing I'm noticing here is that the check only happens if the compulsory node is on the main line. For compulsory components attached to Event nodes, for example, it wouldn't fire.
It's pretty significant since in the Agents lib, we do events a lot.
One other use case that I need to confirm is whether we want to fire this warning for hanging compulsory ports / placeholders. My intuition is that it shouldn't? But let me get back to you on this on a weekday.
|
Thanks for the observation. I believe the issue is not in this PR itself, but in the current validation function getAllNodesFromStartToFinish(). This function only checks nodes in the main workflow chain and ignores any nodes that are not part of it (e.g., those connected via Event nodes). As a result, any component with compulsory ports outside the main flow is currently skipped without warning. I propose updating the validation logic to iterate through all nodes on the canvas, but only raise warnings for nodes that are connected on at least one side (in or out). |
This sounds good. |
MFA-X-AI
left a comment
There was a problem hiding this comment.
Great job, can confirm it fires the warning for both front and backend, even in events. Merging!
Description
This PR introduces:
Error message for unconnected [★] compulsory InPorts during save and compile in the GUI (previously only shown on run).
CLI-level warning via enforce_compulsory_ports without blocking compilation.
No breaking behavior; compilation and save continue as usual.
Pull Request Type
Type of Change
Tests
1. GUI: Save and Compile with unconnected compulsory ports
On the canvas, leave a component that has a [★] compulsory InPort unconnected.
Click Save:
Workflow saved successfully.Please make sure the [★]COMPULSORY InPorts are connected.Click Compile:
Workflow compiled successfully.2. CLI: Compile with unconnected compulsory ports
.pyfile.Tested on? Specify Version.