Input order of a task is now sorted according to the order of definition of the connections#251
Merged
Merged
Conversation
this was done to make sure the edge ids in the graph depend on the order the cnx are added in the ron config since this is true, this can be used to sort the input order according to the cnx order
Previously, the input order of a tasks was sorted according to the order in which the input nodes are created in the runtime plan(which means that it was related to the order the nodes were defined in the config file). Now, the input order of a task is related to the order of the connections in the cnx array in the config file. The inputs are actually sorted according to the edge id in the config graph, that is assigned whenever an edge is created. Since the edges are created in the same order as the cnx array(or when a connection is created programatically), sorting by the edge id achieves the desired behaviour.
Collaborator
|
fantastic! I'll take a look tomorrow morning |
gbin
approved these changes
Mar 5, 2025
gbin
left a comment
Collaborator
There was a problem hiding this comment.
This is really good, thanks! I'll merge that and I'll beta test on my project right away.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #187
Took me a while, but finally got some time to work on this 😅.
I'm pretty confident this solution doesn´t affect other parts of the runtime unexpectedly, since it only mutates the input_msg_indices_types object, but I have made some assumptions to actually obtain the id used to sort and I decided panicking would be more appropriate than having a fallback option, so I'm a little worried there's an edge case I'm not aware that might break this solution. (I did test with the examples though).
The reason I created two unit tests was to make sure this works both with a config file and programmatically.