[core] attribute: Fix hasOutputConnections for ListAttributes#2731
Merged
[core] attribute: Fix hasOutputConnections for ListAttributes#2731
hasOutputConnections for ListAttributes#2731Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in determining output connections for ListAttributes during node upgrades.
- Updated the edge comparison logic from "in" to "==" to avoid type errors when comparing Attribute objects.
- Ensures that the compatibility node remains stable by correctly checking connections.
Comments suppressed due to low confidence (1)
meshroom/core/attribute.py:768
- Replacing 'edge.src in self._value' with 'edge.src == self' fixes the TypeError, but please confirm that comparing equality with self aligns with the intended logic for identifying output connections.
return next((edge for edge in self.node.graph.edges.values() if edge.src == self), None) is not None or \
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## develop #2731 +/- ##
========================================
Coverage 77.11% 77.11%
========================================
Files 41 41
Lines 6166 6166
========================================
Hits 4755 4755
Misses 1411 1411 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nicolas-lambert-tc
approved these changes
Jun 2, 2025
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.
Description
This PR fixes an issue seemingly introduced in cc4e1a2 that generates errors and leaves a CompatibilityNode in an unstable state when upgrading it.
Below is an example of the generated error when upgrading a
StructureFromMotionnode that was in compatibility mode (in a generic photogrammetry graph):This was caused by the comparison between an
Attributeobject (edge.src) andself._valuewith theinoperator.