Closed speedydreser closed 7 months ago
What version of the solution are you using? We did add a fix to this for the new version (2.1.0) released a few weeks ago.
I use a Version: v2.1.0, but i have the same issue.
I use a Version: v2.0.3.
So it looks like the fix released in v2.1.0 only partially fixed this bug. We will have to investigate what other edge cases are causing the problem. I have noticed that it is more likely to occur if multiple resources have been deleted from the canvas before export.
~One thing I've noticed is that if I import a VPC, and then use the filters to remove some subset of resources, export always breaks.~
I've made a little more progress and I think (?) the bug is here https://github.com/aws-solutions/workload-discovery-on-aws/blob/main/source/backend/functions/drawio/main.py#L188-L189. If the order of the incoming JSON results in a child being before a parent, that child never gets added to the children
array of its parent. An ugly solution is commenting out those two lines and following up with a subsequent for loop of:
for node in nodes:
parent = node.get('parent')
if parent:
node_dict[parent].add_child(node_dict[node.get('id')])
we are using v2.1.3 and also experiencing this, is there any updates on this issue?
@JacobReynolds is correct and so is the fix posted. I have tidied up the lambda function a bit and added steps on how to patch in this comment.
This was fixed in v2.1.6.
I am currently having problems when exporting a diagram to Drawio I get the following error: unsupported operand type(s) for *: 'NoneType' and 'float'
And I have not been able to find the origin of said err